From 3babad7469b6c1e624c831be33066e5c1203f90a Mon Sep 17 00:00:00 2001 From: florimondmanca Date: Fri, 4 Nov 2022 20:05:46 +0100 Subject: [PATCH] Try alternative nginx binding --- client/proxy/nginx.conf | 4 ++-- docker-compose.yml | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/client/proxy/nginx.conf b/client/proxy/nginx.conf index 222b6e77..dcd135e7 100644 --- a/client/proxy/nginx.conf +++ b/client/proxy/nginx.conf @@ -1,9 +1,9 @@ upstream client_legacy { - server localhost:3002; + server host.docker.internal:3002; } upstream client_kit { - server localhost:3003; + server host.docker.internal:3003; } server { diff --git a/docker-compose.yml b/docker-compose.yml index 3ab7deac..180f9dbc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,6 +19,11 @@ services: nginx: image: nginx:latest - network_mode: host + extra_hosts: + # Make localhost on the host machine available to Nginx inside the container. + # See: https://www.howtogeek.com/devops/how-to-connect-to-localhost-within-a-docker-container/ + - host.docker.internal:host-gateway + ports: + - 3001:3001 volumes: - ./client/proxy/nginx.conf:/etc/nginx/conf.d/default.conf:ro