Rakcha ships with two Docker Compose configurations:
docker-compose.yaml (repository root) — orchestrates the full multi-service stack including the web app, MySQL, and Redis.
apps/web/compose.yaml + apps/web/compose.override.yaml — web-only compose files used during web development, providing a lightweight database and mailer service.
Full stack deployment
The root docker-compose.yaml is the primary way to run the entire Rakcha platform locally or in a self-hosted environment.
Services
| Service | Image | Port | Description |
|---|
mysql | mysql:8.0 | 3306:3306 | MySQL 8.0 database. Initialises with shared/database/rakcha_db.sql on first run. Data is persisted in the mysql_data named volume. |
redis | redis:7-alpine | 6379:6379 | Redis 7 for session storage and the Messenger transport queue. |
web | Built from ./apps/web | 8000:8000 | Symfony web application served via PHP-FPM and Nginx. |
The web service waits for both mysql and redis to pass their health checks before starting.
Starting the stack
On first run, Docker builds the web image from apps/web/Dockerfile. Subsequent starts reuse the cached image.
Stopping the stack
To also remove the persistent database volume:
Viewing logs
# All services
docker compose logs -f
# Single service
docker compose logs -f web
docker compose logs -f mysql
Environment variables
The root compose file injects the following variables directly into the web service container:
| Variable | Value | Description |
|---|
DATABASE_URL | mysql://root:root@mysql:3306/rakcha_db | Connects to the mysql service using the internal Docker network hostname. |
REDIS_URL | redis://redis:6379 | Connects to the redis service. |
To supply additional variables (Stripe keys, OAuth secrets, etc.), create a .env file at the repository root and reference it from the compose file, or export variables in your shell before running docker compose up.
Web app Dockerfile
The web application image is defined in apps/web/Dockerfile.
The build process:
- Installs system packages:
git, unzip, ICU, pq, zip, GD, Nginx, and PHP extensions (intl, pdo, pdo_mysql, zip, gd, bcmath, exif).
- Copies Composer 2 from the official Composer image.
- Sets
/var/www/html as the working directory and copies all project files.
- Runs
composer install to fetch PHP dependencies.
- Copies
nginx.conf into the image.
- Exposes port
80.
- Starts Nginx and PHP-FPM together via the default
CMD.
Building the image manually
docker build -t rakcha-web ./apps/web
Running the image standalone
docker run -d \
-p 8000:80 \
-e DATABASE_URL="mysql://root:[email protected]:3306/rakcha_db" \
rakcha-web
Desktop app Dockerfile
The desktop application image is defined in apps/desktop/Dockerfile.
The build process:
- Installs X11, GTK 3, and JavaFX system dependencies.
- Adds the Adoptium APT repository and installs Temurin 21 JDK and Maven.
- Sets
JAVA_HOME, locale, and encoding environment variables.
- Copies
pom.xml first (for layer caching), then downloads Maven dependencies.
- Copies source files and compiles with
mvn clean compile -DskipTests.
- Exposes port
8080 and starts the JPro server via mvn jpro:run.
Building the desktop image
docker build -t rakcha-desktop ./apps/desktop
The desktop image requires an X11 display or a virtual framebuffer (Xvfb) to run JavaFX. It is primarily intended for CI builds and headless testing rather than end-user deployment.
Web development compose
The files in apps/web/ provide a minimal Docker Compose setup focused on the web application alone.
compose.yaml
Defines a single database service using mysql:latest with MYSQL_ROOT_PASSWORD=password. Port 3306 is exposed to the host but not mapped by default — edit the file to map it explicitly if you need direct access.
compose.override.yaml
Automatically merged with compose.yaml when you run Docker Compose from apps/web/. It adds:
- A port override on the
database service (PostgreSQL-compatible port 5432).
- A
mailer service using the Mailpit image on ports 1025 (SMTP) and 8025 (web UI), with permissive authentication for local development.
Running the web-only stack
docker compose -f apps/web/compose.yaml up -d
Stopping the web-only stack
docker compose -f apps/web/compose.yaml down
Viewing web stack logs
docker compose -f apps/web/compose.yaml logs -f
Health checks
The root docker-compose.yaml configures health checks for both mysql and redis:
| Service | Check command | Interval | Timeout | Retries |
|---|
mysql | mysqladmin ping -h localhost -uroot -proot | 10 s | 5 s | 5 |
redis | redis-cli ping | 10 s | 3 s | 3 |
The web service starts only after both upstream health checks pass (condition: service_healthy).