Some checks failed
CI/CD Pipeline / Run Tests (push) Failing after 45s
CI/CD Pipeline / Code Quality Checks (push) Failing after 48s
CI/CD Pipeline / Build Docker Images (push) Has been skipped
CI/CD Pipeline / Push to Gitea Registry (push) Has been skipped
CI/CD Pipeline / Deploy to Server (push) Has been skipped
75 lines
1.7 KiB
YAML
75 lines
1.7 KiB
YAML
x-web-build: &web-build
|
|
context: .
|
|
dockerfile: docker/Dockerfile
|
|
target: runtime-web
|
|
args:
|
|
INSTALL_DEV: "false"
|
|
|
|
x-celery-build: &celery-build
|
|
context: .
|
|
dockerfile: docker/Dockerfile
|
|
target: runtime-celery
|
|
args:
|
|
INSTALL_DEV: "false"
|
|
|
|
services:
|
|
web:
|
|
build: *web-build
|
|
image: ${WEB_IMAGE:-state_corp-web:latest}
|
|
container_name: state_corp_web
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env.prod
|
|
ports:
|
|
- "8000:8000"
|
|
volumes:
|
|
- ./logs:/app/logs
|
|
- ./media:/app/media
|
|
- ./staticfiles:/app/staticfiles
|
|
- ./input:/app/input
|
|
command: ["web"]
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -fsS http://127.0.0.1:${PORT:-8000}/health/ready/ || exit 1"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 12
|
|
start_period: 20s
|
|
|
|
celery_worker:
|
|
build: *celery-build
|
|
image: ${CELERY_IMAGE:-state_corp-celery:latest}
|
|
container_name: state_corp_celery_worker
|
|
restart: unless-stopped
|
|
environment:
|
|
RUN_MIGRATIONS: "0"
|
|
CELERY_WORKER_CONCURRENCY: "1"
|
|
CELERY_WORKER_MAX_MEMORY_PER_CHILD_KB: "3145728"
|
|
env_file:
|
|
- .env.prod
|
|
depends_on:
|
|
web:
|
|
condition: service_healthy
|
|
mem_limit: 3g
|
|
memswap_limit: 3g
|
|
volumes:
|
|
- ./logs:/app/logs
|
|
- ./input:/app/input
|
|
command: ["celery-worker"]
|
|
|
|
celery_beat:
|
|
build: *celery-build
|
|
image: ${CELERY_IMAGE:-state_corp-celery:latest}
|
|
container_name: state_corp_celery_beat
|
|
restart: unless-stopped
|
|
environment:
|
|
RUN_MIGRATIONS: "0"
|
|
env_file:
|
|
- .env.prod
|
|
depends_on:
|
|
web:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./logs:/app/logs
|
|
- ./input:/app/input
|
|
command: ["celery-beat"]
|