30 lines
791 B
YAML
30 lines
791 B
YAML
services:
|
|
backend:
|
|
image: python:3.12-slim
|
|
working_dir: /app/backend
|
|
volumes:
|
|
- ./backend:/app/backend
|
|
- ./data:/app/data
|
|
environment:
|
|
DATABASE_URL: sqlite:////app/data/math.db
|
|
CORS_ORIGINS: http://localhost:5173,http://127.0.0.1:5173
|
|
command: >
|
|
sh -c "pip install --no-cache-dir -q -r requirements.txt &&
|
|
python -m seed &&
|
|
uvicorn main:app --host 0.0.0.0 --port 8000 --reload"
|
|
ports:
|
|
- "8000:8000"
|
|
|
|
frontend:
|
|
image: node:22-alpine
|
|
working_dir: /app/frontend
|
|
volumes:
|
|
- ./frontend:/app/frontend
|
|
environment:
|
|
VITE_API_PROXY: http://backend:8000
|
|
command: sh -c "npm install && npm run dev -- --host 0.0.0.0"
|
|
ports:
|
|
- "5173:5173"
|
|
depends_on:
|
|
- backend
|