fe41a8cbee
Co-authored-by: Copilot <copilot@github.com>
59 lines
1.3 KiB
YAML
59 lines
1.3 KiB
YAML
services:
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
container_name: ai-backend
|
|
ports:
|
|
- "12000:12000"
|
|
environment:
|
|
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY}
|
|
- JWT_SECRET=${JWT_SECRET}
|
|
- APP_URL=${APP_URL:-http://localhost}
|
|
- APP_NAME=${APP_NAME:-AI Allucanget}
|
|
- CORS_ORIGINS=${CORS_ORIGINS:-http://localhost:12001}
|
|
volumes:
|
|
- ./data:/app/data
|
|
networks:
|
|
- app-network
|
|
healthcheck:
|
|
test: [ "CMD", "curl", "-f", "http://localhost:12000/health" ]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 5s
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
container_name: ai-frontend
|
|
ports:
|
|
- "12001:12001"
|
|
environment:
|
|
- FLASK_SECRET_KEY=${FLASK_SECRET_KEY}
|
|
- BACKEND_URL=${BACKEND_URL:-http://backend:12000}
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
networks:
|
|
- app-network
|
|
|
|
nginx:
|
|
image: nginx:alpine
|
|
container_name: ai-nginx
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./nginx/docker-compose.conf:/etc/nginx/conf.d/default.conf:ro
|
|
depends_on:
|
|
- backend
|
|
- frontend
|
|
networks:
|
|
- app-network
|
|
|
|
networks:
|
|
app-network:
|
|
driver: bridge
|