fedora-happiness-packets/podman-compose.yml
Justin Wheeler 7c062eb0ce
Some checks failed
CI / lint (push) Failing after 13s
CI / test (push) Failing after 11s
CI / lint (pull_request) Failing after 4s
CI / test (pull_request) Failing after 6s
🔧 containers: Add persistent volume for RabbitMQ data
Without a named volume, RabbitMQ recreates its Mnesia database on every
container restart, losing queue state and requiring the vhost and user
to be re-provisioned. Adding `rabbitmq_data` as a named volume matches
the pattern already used for PostgreSQL (`pgdata`).

Assisted-by: Claude Opus 4.6 (1M context)
Signed-off-by: Justin Wheeler <jwheel@fedoraproject.org>
2026-05-10 16:05:15 +02:00

70 lines
1.6 KiB
YAML

version: "3"
services:
web:
build:
context: .
containerfile: Containerfile
environment:
DJANGO_SETTINGS_MODULE: happinesspackets.settings.dev
FEDORA_MESSAGING_CONF: /app/config.toml
ports:
- "8000:8000"
volumes:
- ./happinesspackets:/app/happinesspackets:z
- ./templates:/app/templates:z
- ./assets:/app/assets:z
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
command: >
bash -c "python manage.py migrate --noinput &&
gunicorn happinesspackets.wsgi:application --bind 0.0.0.0:8000 --reload"
db:
image: docker.io/postgres:17-alpine
environment:
POSTGRES_PASSWORD: example
POSTGRES_DB: postgres
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 5s
retries: 5
redis:
image: docker.io/redis:7-alpine
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
retries: 5
celery:
build:
context: .
containerfile: Containerfile
environment:
DJANGO_SETTINGS_MODULE: happinesspackets.settings.dev
command: celery -A happinesspackets worker -l info
depends_on:
- db
- redis
rabbitmq:
image: docker.io/rabbitmq:3-management-alpine
environment:
RABBITMQ_DEFAULT_USER: user
RABBITMQ_DEFAULT_PASS: pass
RABBITMQ_DEFAULT_VHOST: vhost
volumes:
- rabbitmq_data:/var/lib/rabbitmq:z
healthcheck:
test: ["CMD", "rabbitmqctl", "status"]
interval: 10s
retries: 5
volumes:
pgdata:
rabbitmq_data: