mitgliederverwaltung/docker-compose.yml
Moritz 365ff10fd8 feat(docker): parametrize host ports and project name for parallel dev stacks
Several isolated stacks can now coexist: host ports come from DB_PORT/RAUTHY_PORT/MAILCRAB_PORT (defaulting to today's values) and the container namespace from COMPOSE_PROJECT_NAME. Drops the fixed rauthy-dev container_name that blocked a second stack.
2026-06-15 17:48:53 +02:00

59 lines
1.5 KiB
YAML

networks:
local:
rauthy-dev:
services:
db:
image: postgres:18.4-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: mv_dev
volumes:
- postgres-data:/var/lib/postgresql
ports:
- "${DB_PORT:-5000}:5432"
networks:
- local
mailcrab:
image: marlonb/mailcrab:latest
ports:
- "${MAILCRAB_PORT:-1080}:1080"
networks:
- rauthy-dev
rauthy:
# No fixed container_name — Compose derives it from COMPOSE_PROJECT_NAME so
# several isolated stacks coexist (e.g. mv-<issue>-rauthy-1). A plain
# checkout gets <dir>-rauthy-1.
image: ghcr.io/sebadob/rauthy:0.35.2
environment:
- LOCAL_TEST=true
- SMTP_URL=mailcrab
- SMTP_PORT=1025
- SMTP_DANGER_INSECURE=true
- LISTEN_SCHEME=http
# Advertised URL must match the host-mapped port below.
- PUB_URL=localhost:${RAUTHY_PORT:-8080}
- BOOTSTRAP_ADMIN_PASSWORD_PLAIN=RauthyTest12345
# Disable strict IP validation to allow access from multiple Docker networks
- SESSION_VALIDATE_IP=false
# Auto-seed the `mv` OIDC client (id + plain secret) on first DB init.
# Re-runs after `docker compose down -v` because the DB is empty again.
- BOOTSTRAP_DIR=/app/bootstrap
ports:
- "${RAUTHY_PORT:-8080}:8080"
depends_on:
- mailcrab
- db
networks:
- rauthy-dev
- local
volumes:
- rauthy-data:/app/data
- ./rauthy-bootstrap:/app/bootstrap:ro
volumes:
postgres-data:
rauthy-data: