From 672b13fc755fa312362e421105eff83a985ad965 Mon Sep 17 00:00:00 2001 From: Francesco Aliprandi Date: Sat, 20 Apr 2024 20:34:02 +0200 Subject: [PATCH] chore: proxy api requests to port 80 and bind socket only to localhost 1. All `/api` requests from the frontend are proxied to `http://cerbero-backend` on port 80, therefore the `API_PORT` environment variable MUST be set to 80 for now. 2. Bind the tcp socket only to `127.0.0.1` in the `docker-compose` file. --- web/docker-compose.yml | 3 +-- web/frontend/nginx.conf | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/web/docker-compose.yml b/web/docker-compose.yml index a5276aa..73f312e 100644 --- a/web/docker-compose.yml +++ b/web/docker-compose.yml @@ -16,8 +16,7 @@ services: cerbero-redis-stack: condition: service_healthy ports: - - 8080:${API_PORT} - - 6969:${SOCKET_PORT} + - 127.0.0.1:6969:${SOCKET_PORT} env_file: - .env diff --git a/web/frontend/nginx.conf b/web/frontend/nginx.conf index fb0d6f7..987735a 100644 --- a/web/frontend/nginx.conf +++ b/web/frontend/nginx.conf @@ -18,7 +18,7 @@ http { } location /api/ { - proxy_pass http://cerbero-backend:8080; + proxy_pass http://cerbero-backend; } } }