krona-staff/compose.yaml
Ochenstarik 3b12831ebe
Some checks failed
ci / verify (push) Has been cancelled
ci: add portable deployment and verification pipeline
2026-09-10 23:29:29 +07:00

35 lines
1.1 KiB
YAML

services:
app:
build: .
env_file: .env
ports: ["8080:8080"]
depends_on:
postgres: { condition: service_healthy }
redis: { condition: service_healthy }
restart: unless-stopped
read_only: true
tmpfs: [/tmp]
security_opt: ["no-new-privileges:true"]
migrate:
build: { context: ., target: build }
env_file: .env
command: ["node", "scripts/migrate.mjs", "up"]
depends_on:
postgres: { condition: service_healthy }
profiles: ["tools"]
postgres:
image: postgres:17-alpine
environment:
POSTGRES_DB: krona_staff
POSTGRES_USER: krona_staff
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-local-development-only}
volumes: ["postgres-data:/var/lib/postgresql/data"]
healthcheck: { test: ["CMD-SHELL", "pg_isready -U krona_staff -d krona_staff"], interval: 5s, timeout: 3s, retries: 20 }
redis:
image: redis:7-alpine
command: ["redis-server", "--appendonly", "yes"]
volumes: ["redis-data:/data"]
healthcheck: { test: ["CMD", "redis-cli", "ping"], interval: 5s, timeout: 3s, retries: 20 }
volumes:
postgres-data:
redis-data: