From b3736c15d6398580029098422ed306a683adadd2 Mon Sep 17 00:00:00 2001 From: Malin Date: Thu, 16 Apr 2026 13:23:54 +0200 Subject: [PATCH] fix: change backend port to 3984, fix healthcheck with node http, relax frontend dependency Co-Authored-By: Claude Sonnet 4.6 --- docker-compose.yml | 12 ++++++------ nginx.conf | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index e45679e..6f4b116 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,16 +10,16 @@ services: environment: - REPLICATE_API_TOKEN=${REPLICATE_API_TOKEN} - FRONTEND_URL=${FRONTEND_URL:-http://localhost} - - PORT=3001 + - PORT=3984 volumes: # Persist model config across container restarts - iqai-models:/app/data healthcheck: - test: ["CMD", "wget", "-qO-", "http://localhost:3001/api/health"] - interval: 30s + 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 timeout: 10s - retries: 3 - start_period: 10s + retries: 5 + start_period: 15s networks: - iqai-net @@ -33,7 +33,7 @@ services: - "${FRONTEND_PORT:-1984}:80" depends_on: backend: - condition: service_healthy + condition: service_started networks: - iqai-net diff --git a/nginx.conf b/nginx.conf index 8c83d79..851d51f 100644 --- a/nginx.conf +++ b/nginx.conf @@ -11,7 +11,7 @@ server { # Proxy /api requests to backend location /api { - proxy_pass http://backend:3001; + proxy_pass http://backend:3984; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade';