- Fixed nginx.conf to proxy all API routes (/patches, /generate, /health, /docs) - Changed frontend port to 3080 in docker-compose.yml - Added Caddyfile for Caddy2 reverse proxy configuration - Supports both FQDN and IP:port configurations
44 lines
1019 B
YAML
44 lines
1019 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
container_name: ai-photo-edit-backend
|
|
ports:
|
|
- "8000:8000"
|
|
volumes:
|
|
- ./data:/app/data
|
|
- ./backend:/app
|
|
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:-}
|
|
- CORS_ORIGINS=http://localhost:5173,http://localhost:3000,http://localhost
|
|
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:
|