From 9953201fe3a6fa923f338601f48af9d1c79b7a15 Mon Sep 17 00:00:00 2001 From: tobiasfremming Date: Sun, 31 May 2026 20:42:42 +0200 Subject: [PATCH] feat: update backend API URL in chat service and add backend proxy configuration in Nginx --- docker-compose.yml | 4 ++-- nginx.conf | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 653cab4..c40f2c6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -160,13 +160,13 @@ services: context: ../RAGdollChat dockerfile: Dockerfile args: - NEXT_PUBLIC_BACKEND_API_URL: ${PUBLIC_BASE_URL:-https://iplvr.it.ntnu.no} + NEXT_PUBLIC_BACKEND_API_URL: ${PUBLIC_BASE_URL:-https://iplvr.it.ntnu.no}/backend NEXT_PUBLIC_BASE_PATH: /chat container_name: ragdoll-chat environment: - NODE_ENV=production - PORT=3001 - - NEXT_PUBLIC_BACKEND_API_URL=${PUBLIC_BASE_URL:-https://iplvr.it.ntnu.no} + - NEXT_PUBLIC_BACKEND_API_URL=${PUBLIC_BASE_URL:-https://iplvr.it.ntnu.no}/backend - NEXT_PUBLIC_BASE_PATH=/chat expose: - "3001" diff --git a/nginx.conf b/nginx.conf index d94a18f..357730f 100644 --- a/nginx.conf +++ b/nginx.conf @@ -32,6 +32,14 @@ server { proxy_set_header X-Forwarded-Proto $scheme; } + location /backend/ { + proxy_pass http://backend-service:8000/; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + location /chat/ { proxy_pass http://chat-service:3001; proxy_set_header Host $host;