fedora-happiness-packets/podman-compose.yml

70 lines
1.6 KiB
YAML
Raw Normal View History

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: