2026-04-16 13:12:40 +02:00
|
|
|
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}
|
2026-04-16 13:23:54 +02:00
|
|
|
- PORT=3984
|
2026-04-16 13:12:40 +02:00
|
|
|
volumes:
|
|
|
|
|
# Persist model config across container restarts
|
|
|
|
|
- iqai-models:/app/data
|
|
|
|
|
healthcheck:
|
2026-04-16 13:23:54 +02:00
|
|
|
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3984/api/health', r => process.exit(r.statusCode === 200 ? 0 : 1)).on('error', () => process.exit(1))"]
|
|
|
|
|
interval: 15s
|
2026-04-16 13:12:40 +02:00
|
|
|
timeout: 10s
|
2026-04-16 13:23:54 +02:00
|
|
|
retries: 5
|
|
|
|
|
start_period: 15s
|
2026-04-16 13:12:40 +02:00
|
|
|
networks:
|
|
|
|
|
- iqai-net
|
|
|
|
|
|
|
|
|
|
frontend:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
dockerfile: Dockerfile.frontend
|
|
|
|
|
container_name: iqai-frontend
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
ports:
|
2026-04-16 13:18:04 +02:00
|
|
|
- "${FRONTEND_PORT:-1984}:80"
|
2026-04-16 13:12:40 +02:00
|
|
|
depends_on:
|
|
|
|
|
backend:
|
2026-04-16 13:23:54 +02:00
|
|
|
condition: service_started
|
2026-04-16 13:12:40 +02:00
|
|
|
networks:
|
|
|
|
|
- iqai-net
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
iqai-models:
|
|
|
|
|
driver: local
|
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
|
iqai-net:
|
|
|
|
|
driver: bridge
|