Skip to main content
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

ServiceImagePortDescription
mysqlmysql:8.03306:3306MySQL 8.0 database. Initialises with shared/database/rakcha_db.sql on first run. Data is persisted in the mysql_data named volume.
redisredis:7-alpine6379:6379Redis 7 for session storage and the Messenger transport queue.
webBuilt from ./apps/web8000:8000Symfony 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

docker compose up -d
On first run, Docker builds the web image from apps/web/Dockerfile. Subsequent starts reuse the cached image.

Stopping the stack

docker compose down
To also remove the persistent database volume:
docker compose down -v

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:
VariableValueDescription
DATABASE_URLmysql://root:root@mysql:3306/rakcha_dbConnects to the mysql service using the internal Docker network hostname.
REDIS_URLredis://redis:6379Connects 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.
FROM php:8.2-fpm
The build process:
  1. Installs system packages: git, unzip, ICU, pq, zip, GD, Nginx, and PHP extensions (intl, pdo, pdo_mysql, zip, gd, bcmath, exif).
  2. Copies Composer 2 from the official Composer image.
  3. Sets /var/www/html as the working directory and copies all project files.
  4. Runs composer install to fetch PHP dependencies.
  5. Copies nginx.conf into the image.
  6. Exposes port 80.
  7. 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.
FROM amd64/ubuntu:24.04
The build process:
  1. Installs X11, GTK 3, and JavaFX system dependencies.
  2. Adds the Adoptium APT repository and installs Temurin 21 JDK and Maven.
  3. Sets JAVA_HOME, locale, and encoding environment variables.
  4. Copies pom.xml first (for layer caching), then downloads Maven dependencies.
  5. Copies source files and compiles with mvn clean compile -DskipTests.
  6. 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:
ServiceCheck commandIntervalTimeoutRetries
mysqlmysqladmin ping -h localhost -uroot -proot10 s5 s5
redisredis-cli ping10 s3 s3
The web service starts only after both upstream health checks pass (condition: service_healthy).

Build docs developers (and LLMs) love