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;