47 lines
970 B
YAML
47 lines
970 B
YAML
|
|
version: '3.9'
|
||
|
|
|
||
|
|
services:
|
||
|
|
backend:
|
||
|
|
build:
|
||
|
|
context: .
|
||
|
|
dockerfile: Dockerfile.backend
|
||
|
|
container_name: iqai-backend
|
||
|
|
restart: unless-stopped
|
||
|
|
environment:
|
||
|
|
- REPLICATE_API_TOKEN=${REPLICATE_API_TOKEN}
|
||
|
|
- FRONTEND_URL=${FRONTEND_URL:-http://localhost}
|
||
|
|
- PORT=3001
|
||
|
|
volumes:
|
||
|
|
# Persist model config across container restarts
|
||
|
|
- iqai-models:/app/data
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD", "wget", "-qO-", "http://localhost:3001/api/health"]
|
||
|
|
interval: 30s
|
||
|
|
timeout: 10s
|
||
|
|
retries: 3
|
||
|
|
start_period: 10s
|
||
|
|
networks:
|
||
|
|
- iqai-net
|
||
|
|
|
||
|
|
frontend:
|
||
|
|
build:
|
||
|
|
context: .
|
||
|
|
dockerfile: Dockerfile.frontend
|
||
|
|
container_name: iqai-frontend
|
||
|
|
restart: unless-stopped
|
||
|
|
ports:
|
||
|
|
- "${FRONTEND_PORT:-80}:80"
|
||
|
|
depends_on:
|
||
|
|
backend:
|
||
|
|
condition: service_healthy
|
||
|
|
networks:
|
||
|
|
- iqai-net
|
||
|
|
|
||
|
|
volumes:
|
||
|
|
iqai-models:
|
||
|
|
driver: local
|
||
|
|
|
||
|
|
networks:
|
||
|
|
iqai-net:
|
||
|
|
driver: bridge
|