diff --git a/docker-compose.yml b/docker-compose.yml index 0f58998..74c7d9d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,9 @@ services: - "80:80" depends_on: - backend + environment: + - BACKEND_HOST=backend + - BACKEND_PORT=3001 networks: - app-network diff --git a/nginx-template.conf b/nginx-template.conf index de89a74..57f3a5c 100644 --- a/nginx-template.conf +++ b/nginx-template.conf @@ -11,7 +11,7 @@ server { # Proxy API requests to the backend server location /api/ { - proxy_pass http://${BACKEND_HOST:-backend}:${BACKEND_PORT:-3001}/; + proxy_pass http://$BACKEND_HOST:$BACKEND_PORT/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade';