38 lines
932 B
YAML
38 lines
932 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: '["http://127.0.0.1:3000","http://localhost:3000"]'
|
|
ports:
|
|
- "8000: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
|
|
args:
|
|
NEXT_PUBLIC_API_BASE_URL: http://127.0.0.1:8000/api/v1
|
|
environment:
|
|
NEXT_PUBLIC_API_BASE_URL: http://127.0.0.1:8000/api/v1
|
|
ports:
|
|
- "3000:3000"
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
backend_data:
|
|
backend_storage:
|