36 lines
862 B
YAML
36 lines
862 B
YAML
services:
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
env_file:
|
|
- ./backend/.env
|
|
environment:
|
|
DATABASE_URL: sqlite+aiosqlite:////app/data/palm_reading.db
|
|
UPLOAD_DIR: /app/storage/uploads
|
|
CORS_ORIGINS: '["https://m.xclaw.ren","http://127.0.0.1:3011","http://localhost:3011"]'
|
|
ports:
|
|
- "8066:8000"
|
|
volumes:
|
|
- backend_data:/app/data
|
|
- backend_storage:/app/storage
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health').read()"]
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
web:
|
|
build:
|
|
context: ./web
|
|
environment:
|
|
API_INTERNAL_URL: http://backend:8000
|
|
ports:
|
|
- "3011:3000"
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
backend_data:
|
|
backend_storage:
|