- Fix database path mismatch: download_sample_eyes.py now uses ai_photo_edit.db instead of photoedit.db - Add init_database.py script to initialize DB before eye import - Add AUTO_DOWNLOAD_SAM=true environment variable (default: enabled) - Update entrypoint.sh to: 1. Initialize database first 2. Auto-download SAM model (~375MB) on first startup 3. Then import eyes (now works since DB exists) - Update path detection to work in both Docker and local environments
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
container_name: ai-photo-edit-backend
|
|
ports:
|
|
- "8101:8000" # External 8101, internal 8000
|
|
volumes:
|
|
- ./data:/app/data
|
|
- ./backend:/app
|
|
- ./scripts:/scripts
|
|
environment:
|
|
- DATABASE_URL=sqlite:///./data/ai_photo_edit.db
|
|
- SECRET_KEY=${SECRET_KEY:-change-this-secret-key-in-production}
|
|
- AI_PROVIDER=${AI_PROVIDER:-mock}
|
|
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
|
|
- STABILITY_API_KEY=${STABILITY_API_KEY:-}
|
|
- REPLICATE_API_KEY=${REPLICATE_API_KEY:-}
|
|
- CORS_ORIGINS=http://localhost:5173,http://localhost:3000,http://localhost
|
|
- AUTO_DOWNLOAD_SAM=${AUTO_DOWNLOAD_SAM:-true}
|
|
restart: unless-stopped
|
|
networks:
|
|
- ai-photo-edit-network
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
container_name: ai-photo-edit-frontend
|
|
ports:
|
|
- "3080:80" # Frontend on port 3080
|
|
depends_on:
|
|
- backend
|
|
restart: unless-stopped
|
|
networks:
|
|
- ai-photo-edit-network
|
|
|
|
networks:
|
|
ai-photo-edit-network:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
data:
|