This repository has been archived on 2025-03-03. You can view files and clone it, but cannot push or open issues or pull requests.
facturio/docker-compose.yml

63 lines
1.3 KiB
YAML

volumes:
pg_data:
x-django: &x-django
build:
target: dev
extends:
file: docker-compose.build.yml
service: backend
volumes:
- .:/app
depends_on:
- postgres
environment:
- DJANGO_ENV=${DJANGO_ENV}
- DATABASE_HOST=postgres
- DATABASE_URL=psql://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME}
- EMAIL_HOST_USER=${EMAIL_HOST_USER}
- EMAIL_HOST_PASSWORD=${EMAIL_HOST_PASSWORD}
services:
postgres:
image: postgres:17
environment:
- POSTGRES_DB=${DATABASE_NAME}
- POSTGRES_USER=${DATABASE_USER}
- POSTGRES_PASSWORD=${DATABASE_PASSWORD}
ports:
- "5432:5432"
volumes:
- pg_data:/var/lib/postgresql/data
backend:
<<: *x-django
healthcheck:
test: ["CMD", "curl", "--fail", "http://localhost:8000/healthz/"]
interval: 5s
timeout: 2s
retries: 10
start_interval: 10s
ports:
- "8000:8000"
dramatiq:
<<: *x-django
command: ["/app/scripts/run-dramatiq.sh"]
depends_on:
backend:
condition: service_healthy
scheduler:
<<: *x-django
command: [ "/app/scripts/run-scheduler.sh" ]
depends_on:
- dramatiq
gotenberg:
image: gotenberg/gotenberg:8
redis:
image: redis:7.4-alpine