2026-02-04 17:13:58 +01:00
|
|
|
services:
|
|
|
|
|
api:
|
|
|
|
|
build:
|
|
|
|
|
context: ./backend
|
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
|
ports:
|
2026-02-07 19:44:19 +01:00
|
|
|
- "8080:8000"
|
2026-02-04 17:13:58 +01:00
|
|
|
volumes:
|
|
|
|
|
- ./backend/src:/app/src:cached
|
2026-02-05 15:08:54 +01:00
|
|
|
- ./backend/alembic.ini:/app/alembic.ini:cached
|
2026-02-04 17:13:58 +01:00
|
|
|
environment:
|
|
|
|
|
- DEBUG=true
|
|
|
|
|
- DATABASE_URL=postgresql://postgres:postgres@db:5432/nuzlocke
|
|
|
|
|
depends_on:
|
|
|
|
|
db:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
|
|
frontend:
|
|
|
|
|
build:
|
|
|
|
|
context: ./frontend
|
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
|
ports:
|
|
|
|
|
- "5173:5173"
|
|
|
|
|
volumes:
|
|
|
|
|
- ./frontend/src:/app/src:cached
|
|
|
|
|
- ./frontend/public:/app/public:cached
|
|
|
|
|
- ./frontend/index.html:/app/index.html:cached
|
|
|
|
|
environment:
|
2026-02-07 19:44:19 +01:00
|
|
|
- VITE_API_URL=http://localhost:8080
|
2026-02-04 17:13:58 +01:00
|
|
|
depends_on:
|
|
|
|
|
- api
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
|
|
db:
|
|
|
|
|
image: postgres:16-alpine
|
|
|
|
|
ports:
|
|
|
|
|
- "5432:5432"
|
|
|
|
|
environment:
|
|
|
|
|
- POSTGRES_USER=postgres
|
|
|
|
|
- POSTGRES_PASSWORD=postgres
|
|
|
|
|
- POSTGRES_DB=nuzlocke
|
|
|
|
|
volumes:
|
|
|
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
|
|
|
interval: 5s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 5
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
postgres_data:
|