45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
# SAPL Garment Intelligence — pilot deployment
|
|
# Frontend (static build) + Caddy reverse proxy + FastAPI backend, same origin.
|
|
#
|
|
# Before `docker compose up`:
|
|
# 1. cp backend/.env.example backend/.env and fill in real keys
|
|
# 2. cd frontend && npm install && npm run build (produces frontend/dist)
|
|
# 3. (optional) seed ./data with existing DB + library — see DEPLOY.md
|
|
# 4. SITE_ADDRESS=app.yourdomain.com docker compose up -d (or omit for :80)
|
|
|
|
services:
|
|
backend:
|
|
build: ./backend
|
|
env_file: ./backend/.env
|
|
environment:
|
|
# Pilot: scraper off; data lives in the mounted volume
|
|
ENABLE_SCRAPER: "false"
|
|
DATABASE_URL: "sqlite:////app/data/sapl_garment_intel.db"
|
|
CHROMADB_PATH: "/app/data/chromadb"
|
|
IMAGES_PATH: "/app/data/images"
|
|
volumes:
|
|
- ./data:/app/data
|
|
expose:
|
|
- "8000"
|
|
restart: unless-stopped
|
|
|
|
caddy:
|
|
image: caddy:2
|
|
depends_on:
|
|
- backend
|
|
environment:
|
|
SITE_ADDRESS: "${SITE_ADDRESS:-:80}"
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
|
- ./frontend/dist:/srv:ro
|
|
- caddy_data:/data
|
|
- caddy_config:/config
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
caddy_data:
|
|
caddy_config:
|