README.md
May 23, 2025 ยท View on GitHub
Setup
- Initialize submodules
git submodule update --init
- Start the stack
For development (hollow mode with bind mounts):
# Generate the development configuration
python scripts/generate_compose.py --hollow=true --host-network=false
docker volume rm yellow-dev_mariadb yellow-dev_mariadb_tmp yellow-dev_server_logs yellow-dev_server_tmp
# Run the stack (passing your user ID and group ID to containers)
USER_ID=$(id -u) GROUP_ID=$(id -g) docker compose -f docker-compose.yml up --build --remove-orphans
For CI (full mode without bind mounts):
./ci-run.sh false false
Parameters: ./ci-run.sh [hollow] [host-network] [run-tests]
Example usage:
- Run in CI mode with tests:
./ci-run.sh false false true - Run in CI mode without tests:
./ci-run.sh false false false - Run in development mode:
./ci-run.sh true false false
Docker Configuration
This project uses a dynamic approach to Docker configuration:
-
File Structure:
docker-compose.template.yml- Base template for compose configurationDockerfile_template- Base template for container configurationDockerfile_fragment_copy- Fragment containing COPY and package installation commands
-
Generated Files (by
scripts/generate_compose.py):docker-compose.{mode}.{network}.ymlfiles - Generated compose filesDockerfile_hollow- For development with bind mountsDockerfile_full- For CI with copied source code
-
Modes:
hollow- Development mode with bind mountsfull- CI mode with copied source code
-
Networks:
stack- Default Docker network with containershostnet- Host network mode
A symlink to the most recently generated docker-compose file is created as docker-compose.yml.
development notes
tail -f /var/snap/docker/common/var-lib-docker/volumes/yellow-dev_server_logs/_data/server.log | node node_modules/pino-pretty-min/bin.js
tail -n 9999999 -f /var/snap/docker/common/var-lib-docker/volumes/yellow-dev_server_logs/_data/json.log | pino-elasticsearch -t 100 -l trace -i logs-yellow -u elastic -p changeme -n https://localhost:9200 --rejectUnauthorized false
( https://github.com/sherifabdlnaby/elastdocker )
prettier
npm install -g git-format-staged prettier prettier-plugin-svelte
set -U fish_user_paths $fish_user_paths ~/node_modules/.bin/
db cleanup
echo "use yellow_module_org_libersoft_messages; delete from messages; delete from attachments; delete from file_uploads" | mariadb --protocol=tcp --host=localhost --user=root --password=password --force
client build
cd yellow-client;
bun run build; rm -rf client; mv build client; python3 -m http.server