Files
004.erp.generic/docker-compose.prod.yml
mariomitte 242c8dc9b2
Some checks are pending
ERP CI/CD Pipeline / test (push) Waiting to run
ERP CI/CD Pipeline / Deploy (server git pull + compose) (push) Blocked by required conditions
.zip error creation due to ownership
detected with ai agent
2026-09-08 14:45:37 +02:00

128 lines
3.0 KiB
YAML

services:
db:
restart: unless-stopped
redis:
restart: unless-stopped
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: 004erpbackend
restart: unless-stopped
env_file:
- .env
environment:
DJANGO_SETTINGS_MODULE: core.settings.production
command: gunicorn core.wsgi:application --bind 0.0.0.0:8000 --workers 3 --timeout 120
volumes:
- media_volume:/app/media
ports:
- "8001:8000"
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
media-permissions:
condition: service_completed_successfully
worker:
build:
context: ./backend
dockerfile: Dockerfile
container_name: 004erpworker
restart: unless-stopped
env_file:
- .env
environment:
DEBUG: "False"
DJANGO_SETTINGS_MODULE: core.settings.production
command: celery -A core worker --loglevel=info --concurrency=2 --prefetch-multiplier=1 --max-tasks-per-child=20 --max-memory-per-child=300000
volumes:
- media_volume:/app/media
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
media-permissions:
condition: service_completed_successfully
beat:
build:
context: ./backend
dockerfile: Dockerfile
container_name: 004erpbeat
restart: unless-stopped
env_file:
- .env
environment:
DEBUG: "False"
DJANGO_SETTINGS_MODULE: core.settings.production
command: celery -A core beat --loglevel=info
volumes:
- media_volume:/app/media
depends_on:
redis:
condition: service_started
worker:
condition: service_started
media-permissions:
condition: service_completed_successfully
flower:
build:
context: ./backend
dockerfile: Dockerfile
container_name: 004erpflower
restart: unless-stopped
env_file:
- .env
environment:
DEBUG: "False"
DJANGO_SETTINGS_MODULE: core.settings.production
command: celery -A core flower --port=5555
ports:
- "5555:5555"
depends_on:
redis:
condition: service_started
worker:
condition: service_started
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: 004erpfrontend
restart: unless-stopped
environment:
NODE_ENV: production
PUBLIC_API_URL: ${PUBLIC_API_URL}
command: sh -c "npm run build && node ./dist/server/entry.mjs"
ports:
- "4321:4321"
depends_on:
backend:
condition: service_started
webhook:
build: /opt/erp/deploy-webhook
container_name: 004erpwebhook
restart: unless-stopped
environment:
WEBHOOK_SECRET: ${GITEA_WEBHOOK_SECRET}
ports:
- "9001:9001"
volumes:
- /opt/erp/app:/opt/erp/app
- /var/run/docker.sock:/var/run/docker.sock
volumes:
postgres_data:
redis_data:
media_volume:
external: true