75 lines
1.7 KiB
YAML
75 lines
1.7 KiB
YAML
name: polyphonia-ad-ctf-service
|
|
services:
|
|
db:
|
|
image: postgres:15-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
- POSTGRES_DB=polyphonia
|
|
- POSTGRES_USER=postgres
|
|
- POSTGRES_PASSWORD=secret
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
- ./database/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
|
|
networks:
|
|
- polyphonia-network
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 20s
|
|
|
|
polyphonia-binary-server:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.polyphonia-binary-runtime
|
|
restart: unless-stopped
|
|
environment:
|
|
- DB_HOST=db
|
|
- DB_PORT=5432
|
|
- DB_NAME=polyphonia
|
|
- DB_USER=postgres
|
|
- DB_PASS=secret
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./dist/polyphonia-server-binary:/server:ro
|
|
command: /server
|
|
networks:
|
|
- polyphonia-network
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/api/user"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
nginx:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.frontend-builder
|
|
restart: unless-stopped
|
|
ports:
|
|
- "22025:80"
|
|
volumes:
|
|
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
networks:
|
|
- polyphonia-network
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:80"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
networks:
|
|
polyphonia-network:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
postgres-data:
|
|
driver: local
|