hku-class/docker-compose.yml
2026-04-12 19:04:31 +08:00

32 lines
700 B
YAML

services:
backend:
build: ./backend
restart: unless-stopped
env_file: ./backend/.env
environment:
- CH_DATABASE_URL=sqlite+aiosqlite:///./data/classhub.db
- CH_FRONTEND_URL=http://localhost
volumes:
- classhub-data:/app/data
ports:
- "8000:8000"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/api/health')"]
interval: 30s
timeout: 5s
retries: 3
frontend:
build:
context: ./frontend
args:
- NEXT_PUBLIC_API_URL=
restart: unless-stopped
ports:
- "3008:3000"
depends_on:
- backend
volumes:
classhub-data: