79 lines
2.0 KiB
YAML
79 lines
2.0 KiB
YAML
name: club12
|
|
|
|
services:
|
|
# Network-private Postgres. Same major as the Supabase project it replaces
|
|
# (17) and as the Dockerfile's postgresql-client-17. Data lives on the host's
|
|
# /home partition, not Docker's default volume dir on the small root partition.
|
|
# No `ports:` — reachable only from the club12 network. For local dev on a
|
|
# non-Linux host, override the volume source in a git-ignored
|
|
# docker-compose.override.yml.
|
|
db:
|
|
image: postgres:17-alpine
|
|
env_file: .env
|
|
command:
|
|
- "postgres"
|
|
- "-c"
|
|
- "shared_buffers=128MB"
|
|
- "-c"
|
|
- "effective_cache_size=512MB"
|
|
volumes:
|
|
- /home/docker/club12/db:/var/lib/postgresql/data
|
|
networks: [club12]
|
|
expose: ["5432"]
|
|
restart: unless-stopped
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 512m
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 30s
|
|
|
|
backend:
|
|
build: { context: ./Club12-Backend }
|
|
image: ghcr.io/francoru/club12-backend:latest
|
|
env_file: .env
|
|
environment:
|
|
ASPNETCORE_ENVIRONMENT: Production
|
|
expose: ["8080"]
|
|
networks: [club12]
|
|
volumes:
|
|
- backup-data:/app/backups
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 1g
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-fsS", "http://localhost:8080/health/ready"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 90s
|
|
|
|
frontend:
|
|
build:
|
|
context: ./Club12-WebClient
|
|
image: ghcr.io/francoru/club12-frontend:latest
|
|
depends_on:
|
|
backend: { condition: service_healthy }
|
|
ports: ["${FRONTEND_PORT:-5001}:80"]
|
|
networks: [club12]
|
|
restart: unless-stopped
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 128m
|
|
|
|
networks:
|
|
club12: { driver: bridge }
|
|
|
|
volumes:
|
|
backup-data: {}
|