Docker Setup — Celery Workers
This guide covers the development Docker setup — you get a production-like environment without manually managing Redis, PostgreSQL, and worker processes.
When to use this setup
Section titled “When to use this setup”| Scenario | Recommended setup |
|---|---|
| Frontend / Geant4 in-browser only | Local Frontend Demo |
| Full stack with SHIELD-HIT12A or FLUKA | This page |
| Full stack with SLURM cluster | Local SLURM |
Prerequisites
Section titled “Prerequisites”- Docker Engine 20.10+
- Git
Clone and start
Section titled “Clone and start”Clone the repository:
git clone https://github.com/yaptide/yaptide.gitNavigate to the yaptide/ directory:
cd yaptideTwo startup options are available:
Standard mode — builds and starts all containers:
scripts/start_with_docker.shscripts/start_with_docker.ps1Develop mode — same as standard, but mounts your local source code into the containers so code changes are reflected without rebuilding:
scripts/start_with_docker_develop.shscripts/start_with_docker_develop.ps1There’s two startup modes. The fast mode has custom healthcheck frequency, but requires Docker Engine v25. The slow mode is compatible with older Docker versions. The scripts detect your Docker version and use the fastest available startup mode automatically.
Create a user
Section titled “Create a user”docker exec -w /usr/local/app/ yaptide_flask \ ./yaptide/admin/db_manage.py add-user admin --password passwordStart the frontend
Section titled “Start the frontend”The backend API is available at http://localhost:5000 (via NGINX). Clone the frontend repo in a separate terminal:
git clone https://github.com/yaptide/ui.gitNavigate to the ui directory:
cd uiPull the converter submodule. The converter is a standalone Python package that translates the editor’s JSON project format into native input files for simulation engines:
git submodule update --init --recursiveCreate a .env file in the ui/ directory:
REACT_APP_BACKEND_URL=http://localhost:5000Run the frontend container from the ui/ directory:
docker compose upOpen http://localhost and log in using credentials you created (username: admin, password: password). The setup is complete now.
Stopping
Section titled “Stopping”docker compose downTo also delete all data (PostgreSQL volume, simulator cache):
docker compose down -vManaging the database
Section titled “Managing the database”View all management commands:
docker exec -w /usr/local/app/ yaptide_flask \ ./yaptide/admin/db_manage.py --helpConnecting to PostgreSQL directly
Section titled “Connecting to PostgreSQL directly”The PostgreSQL container exposes port 5432. Connect with any PostgreSQL client:
psql -h localhost -U yaptide_user -d yaptide_db# password: yaptide_password (default)Or use a GUI tool like DataGrip or pgAdmin.
Container overview
Section titled “Container overview”| Container | Port | Purpose |
|---|---|---|
yaptide_nginx | 5000 (HTTP), 8443 (HTTPS) | Reverse proxy |
yaptide_flask | 6000 (internal) | Flask API |
yaptide_postgresql | 5432 | Database |
yaptide_redis | 6379 (internal) | Celery broker |
yaptide_simulation_worker | — | Runs simulations |
yaptide_helper_worker | — | Post-processing |
Check container health:
docker compose psView logs:
docker compose logs -f yaptide_flaskdocker compose logs -f yaptide_simulation_workerdocker compose logs -f yaptide_helper_worker