- docker-compose.yml → production (Coolify default) - docker-compose.dev.yml → local development Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
51 lines
1.1 KiB
YAML
51 lines
1.1 KiB
YAML
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: availability
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
ports:
|
|
- "5433:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
environment:
|
|
DATABASE_URL: postgresql+asyncpg://postgres:postgres@db:5432/availability
|
|
SYNC_DATABASE_URL: postgresql://postgres:postgres@db:5432/availability
|
|
env_file:
|
|
- .env
|
|
ports:
|
|
- "8001:8000"
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
volumes:
|
|
- ./backend/src:/app/src
|
|
- ./backend/alembic:/app/alembic
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "5174:8080"
|
|
environment:
|
|
VITE_API_URL: http://localhost:8001
|
|
depends_on:
|
|
- backend
|
|
volumes:
|
|
- ./frontend/src:/app/src
|
|
|
|
volumes:
|
|
postgres_data:
|