Initial setup of frontend and backend

This commit is contained in:
Julian Tabel
2026-02-04 17:13:58 +01:00
parent 259c200d93
commit 6ee53a0533
72 changed files with 5687 additions and 0 deletions

52
docker-compose.yml Normal file
View File

@@ -0,0 +1,52 @@
services:
api:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8000:8000"
volumes:
- ./backend/src:/app/src:cached
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:
- VITE_API_URL=http://localhost:8000
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: