Files
state-corp-backend/docker-compose.dev.yml
Aleksandr Meshchriakov 345b1d0cc8
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
Add initial implementations for forms and organization apps with serializers, factories, and admin configurations
2026-03-28 18:23:06 +01:00

113 lines
2.5 KiB
YAML

x-app-build: &app-build
context: .
dockerfile: docker/Dockerfile
args:
INSTALL_DEV: "true"
services:
db:
image: postgres:15.10
container_name: state_corp_db
restart: unless-stopped
env_file:
- .env.dev
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- ./data/db:/var/lib/postgresql/data
- ./docker/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 3s
retries: 10
redis:
image: redis:7-alpine
container_name: state_corp_redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- ./data/redis:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 10
web:
build:
<<: *app-build
target: runtime-web
container_name: state_corp_web
restart: unless-stopped
env_file:
- .env.dev
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
ports:
- "8000:8000"
volumes:
- ./src:/app/src
- ./logs:/app/logs
- ./media:/app/media
- ./staticfiles:/app/staticfiles
- ./input:/app/input
command: ["web-dev"]
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:
<<: *app-build
target: runtime-celery
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.dev
depends_on:
web:
condition: service_healthy
mem_limit: 3g
memswap_limit: 3g
volumes:
- ./src:/app/src
- ./logs:/app/logs
- ./input:/app/input
command: ["celery-worker"]
celery_beat:
build:
<<: *app-build
target: runtime-celery
container_name: state_corp_celery_beat
restart: unless-stopped
environment:
RUN_MIGRATIONS: "0"
env_file:
- .env.dev
depends_on:
web:
condition: service_healthy
volumes:
- ./src:/app/src
- ./logs:/app/logs
- ./input:/app/input
command: ["celery-beat"]