Docker
Runtime Base Image
File: docker/runtime-base.Dockerfile
A shared base image for all Rust service containers, built and pushed separately.
FROM debian:bookworm-slim
Includes:
ca-certificates,openssl,tini,curl,tzdata- Timezone set to
Europe/Berlin - Non-root user
apollon(UID 1001, GID 1001, no login shell)
This image is built nightly and on changes to the Dockerfile via the build-runtime-base.yml workflow.
Docker Compose Dev Stack
Location: dev-stack/
The dev stack consists of two compose files:
Database Services
File: dev-stack/db.docker-compose.yml
services:
postgres:
image: postgres:18-alpine3.23
environment:
- POSTGRES_USER=${POSTGRES_USER:-apollon}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-apollon}
- POSTGRES_DB=${POSTGRES_DB:-apollon}
volumes:
- apollon_postgres_data:/var/lib/postgresql
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U apollon"]
interval: 5s
timeout: 5s
retries: 5
timescaledb:
image: timescale/timescaledb-ha:pg18
environment:
- POSTGRES_USER=${TSDB_USER:-apollon}
- POSTGRES_PASSWORD=${TSDB_PASSWORD:-apollon}
- POSTGRES_DB=${TSDB_DB:-apollon_tsdb}
- TS_TUNE_MEMORY=2GB
- TS_TUNE_NUM_CPUS=2
volumes:
- apollon_timescaledb_data:/home/postgres/pgdata
ports:
- "5433:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U apollon"]
interval: 5s
timeout: 5s
retries: 5
Port Mapping
| Service | Internal Port | External Port |
|---|---|---|
| PostgreSQL | 5432 | 5432 |
| TimescaleDB | 5432 | 5433 |
Starting the Dev Stack
# Start databases
just db-up
# Or directly via docker compose
docker compose -f dev-stack/db.docker-compose.yml up -d
# View logs
docker compose -f dev-stack/db.docker-compose.yml logs -f
# Stop
just db-down
# Stop and remove data volumes
docker compose -f dev-stack/db.docker-compose.yml down -v
Volumes
| Volume | Mount Point | Purpose |
|---|---|---|
apollon_postgres_data | /var/lib/postgresql | PostgreSQL data directory |
apollon_timescaledb_data | /home/postgres/pgdata | TimescaleDB data directory |