Skip to content

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.

ScenarioRecommended setup
Frontend / Geant4 in-browser onlyLocal Frontend Demo
Full stack with SHIELD-HIT12A or FLUKAThis page
Full stack with SLURM clusterLocal SLURM
  • Docker Engine 20.10+
  • Git

Clone the repository:

Terminal window
git clone https://github.com/yaptide/yaptide.git

Navigate to the yaptide/ directory:

Terminal window
cd yaptide

Two startup options are available:

Standard mode — builds and starts all containers:

Terminal window
scripts/start_with_docker.sh

Develop mode — same as standard, but mounts your local source code into the containers so code changes are reflected without rebuilding:

Terminal window
scripts/start_with_docker_develop.sh

There’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.

Terminal window
docker exec -w /usr/local/app/ yaptide_flask \
./yaptide/admin/db_manage.py add-user admin --password password

The backend API is available at http://localhost:5000 (via NGINX). Clone the frontend repo in a separate terminal:

Terminal window
git clone https://github.com/yaptide/ui.git

Navigate to the ui directory:

Terminal window
cd ui

Pull 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:

Terminal window
git submodule update --init --recursive

Create a .env file in the ui/ directory:

ui/.env
REACT_APP_BACKEND_URL=http://localhost:5000

Run the frontend container from the ui/ directory:

Terminal window
docker compose up

Open http://localhost and log in using credentials you created (username: admin, password: password). The setup is complete now.

Terminal window
docker compose down

To also delete all data (PostgreSQL volume, simulator cache):

Terminal window
docker compose down -v

View all management commands:

Terminal window
docker exec -w /usr/local/app/ yaptide_flask \
./yaptide/admin/db_manage.py --help

The PostgreSQL container exposes port 5432. Connect with any PostgreSQL client:

Terminal window
psql -h localhost -U yaptide_user -d yaptide_db
# password: yaptide_password (default)

Or use a GUI tool like DataGrip or pgAdmin.

ContainerPortPurpose
yaptide_nginx5000 (HTTP), 8443 (HTTPS)Reverse proxy
yaptide_flask6000 (internal)Flask API
yaptide_postgresql5432Database
yaptide_redis6379 (internal)Celery broker
yaptide_simulation_workerRuns simulations
yaptide_helper_workerPost-processing

Check container health:

Terminal window
docker compose ps

View logs:

Terminal window
docker compose logs -f yaptide_flask
Terminal window
docker compose logs -f yaptide_simulation_worker
Terminal window
docker compose logs -f yaptide_helper_worker