56 lines
1.2 KiB
YAML
56 lines
1.2 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: redflag-postgres
|
|
environment:
|
|
POSTGRES_DB: redflag
|
|
POSTGRES_USER: redflag
|
|
POSTGRES_PASSWORD: redflag_bootstrap
|
|
POSTGRES_INITDB_ARGS: "--encoding=UTF-8 --lc-collate=C --lc-ctype=C"
|
|
volumes:
|
|
- postgres-data:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U redflag"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
env_file:
|
|
- ${ENV_FILE:-./config/.env}
|
|
|
|
server:
|
|
build:
|
|
context: .
|
|
dockerfile: ./aggregator-server/Dockerfile
|
|
container_name: redflag-server
|
|
volumes:
|
|
- server-config:/app/config
|
|
- server-data:/app/data
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
ports:
|
|
- "8080:8080"
|
|
command: ["./redflag-server"]
|
|
restart: unless-stopped
|
|
env_file:
|
|
- ${ENV_FILE:-./config/.env}
|
|
|
|
web:
|
|
build:
|
|
context: ./aggregator-web
|
|
dockerfile: Dockerfile
|
|
container_name: redflag-web
|
|
ports:
|
|
- "3000:80"
|
|
depends_on:
|
|
- server
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres-data:
|
|
server-data:
|
|
server-config:
|