Files
ShooterHub/docker-compose.yaml

37 lines
851 B
YAML

services:
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ballistic
POSTGRES_USER: ballistic
POSTGRES_PASSWORD: "${DB_PASSWORD}"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ballistic"]
interval: 10s
timeout: 5s
retries: 5
web:
build: .
ports:
- "5000:5000"
restart: unless-stopped
depends_on:
db:
condition: service_healthy
env_file:
- .env
environment:
DATABASE_URL: "postgresql+psycopg://ballistic:${DB_PASSWORD}@db:5432/ballistic"
STORAGE_ROOT: "/app/storage"
volumes:
- app_storage:/app/storage
- .:/app # bind-mount source so code changes are live without a rebuild
volumes:
postgres_data:
app_storage: