feat: full backend (untested)

This commit is contained in:
Nik L
2026-01-14 11:37:44 -05:00
parent 4a0db63a30
commit d585cf8613
32 changed files with 1317 additions and 57 deletions

48
docker-compose.yml Normal file
View File

@@ -0,0 +1,48 @@
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: availability
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432: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
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
volumes:
- ./backend/src:/app/src
- ./backend/alembic:/app/alembic
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "5173:8080"
environment:
VITE_API_URL: http://localhost:8000
depends_on:
- backend
volumes:
- ./frontend/src:/app/src
volumes:
postgres_data: