Some checks failed
State Corp Backend CI/CD / Quality gate (push) Failing after 9m34s
State Corp Backend CI/CD / Build linux/amd64 images once (push) Has been skipped
State Corp Backend CI/CD / Release dev (push) Has been skipped
State Corp Backend CI/CD / Refresh and release internal main (push) Has been skipped
State Corp Backend CI/CD / Release customer main (push) Has been skipped
126 lines
2.9 KiB
YAML
126 lines
2.9 KiB
YAML
services:
|
|
db:
|
|
image: ${POSTGRES_IMAGE:?}
|
|
pull_policy: never
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: ${POSTGRES_DB:?}
|
|
POSTGRES_USER: ${POSTGRES_USER:?}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:?} -d ${POSTGRES_DB:?}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 12
|
|
redis:
|
|
image: ${REDIS_IMAGE:?}
|
|
pull_policy: never
|
|
restart: unless-stopped
|
|
command: ["redis-server", "--appendonly", "yes"]
|
|
volumes:
|
|
- redis_data:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 12
|
|
migrate:
|
|
image: ${STATE_WEB_IMAGE:?}
|
|
pull_policy: never
|
|
env_file:
|
|
- path: .env
|
|
required: false
|
|
environment:
|
|
RUN_MIGRATIONS: "1"
|
|
COLLECTSTATIC_ON_MIGRATE: "1"
|
|
volumes:
|
|
- media:/app/media
|
|
- staticfiles:/app/staticfiles
|
|
secrets:
|
|
- sso_public_key
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
command: ["migrate"]
|
|
restart: "no"
|
|
web:
|
|
image: ${STATE_WEB_IMAGE:?}
|
|
pull_policy: never
|
|
restart: unless-stopped
|
|
env_file:
|
|
- path: .env
|
|
required: false
|
|
environment:
|
|
RUN_MIGRATIONS: "0"
|
|
volumes:
|
|
- media:/app/media
|
|
- staticfiles:/app/staticfiles
|
|
secrets:
|
|
- sso_public_key
|
|
depends_on:
|
|
migrate:
|
|
condition: service_completed_successfully
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-fsS", "http://localhost:8000/health/ready/"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 12
|
|
worker:
|
|
image: ${STATE_WORKER_IMAGE:?}
|
|
pull_policy: never
|
|
restart: unless-stopped
|
|
env_file:
|
|
- path: .env
|
|
required: false
|
|
environment:
|
|
RUN_MIGRATIONS: "0"
|
|
CELERY_WORKER_CONCURRENCY: "1"
|
|
volumes:
|
|
- media:/app/media
|
|
secrets:
|
|
- sso_public_key
|
|
depends_on:
|
|
web:
|
|
condition: service_healthy
|
|
command: ["celery-worker"]
|
|
beat:
|
|
image: ${STATE_WORKER_IMAGE:?}
|
|
pull_policy: never
|
|
restart: unless-stopped
|
|
env_file:
|
|
- path: .env
|
|
required: false
|
|
environment:
|
|
RUN_MIGRATIONS: "0"
|
|
secrets:
|
|
- sso_public_key
|
|
depends_on:
|
|
web:
|
|
condition: service_healthy
|
|
command: ["celery-beat"]
|
|
frontend:
|
|
image: ${STATE_FRONTEND_IMAGE:?}
|
|
pull_policy: never
|
|
restart: unless-stopped
|
|
environment:
|
|
BACKEND_UPSTREAM: web:8000
|
|
SSO_ENABLED: ${SSO_ENABLED:-false}
|
|
SSO_AUTO_REDIRECT: ${SSO_AUTO_REDIRECT:-false}
|
|
ports:
|
|
- "${STATE_FRONTEND_PORT:-8080}:80"
|
|
depends_on:
|
|
web:
|
|
condition: service_healthy
|
|
secrets:
|
|
sso_public_key:
|
|
file: ./secrets/sso-public.pem
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|
|
media:
|
|
staticfiles:
|