From 4b5baf427232f1304dd3fcd8ff2c56295e2f0bda Mon Sep 17 00:00:00 2001 From: mfnefd Date: Sun, 3 Nov 2024 22:47:46 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B8=D0=B7=D0=B2=D0=B8=D0=BD=D0=B8=D1=82?= =?UTF-8?q?=D0=B5=20=D1=83=20=D0=BC=D0=B5=D0=BD=D1=8F=20=D0=B3=D0=BE=D0=BB?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=20=D1=83=D0=B6=D0=B5=20=D0=BF=D0=BB=D1=8B?= =?UTF-8?q?=D0=B2=D0=B5=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- balakhonov_danila_lab_3/docker-compose.yaml | 14 ++++++-------- balakhonov_danila_lab_3/nginx.conf | 4 ++-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/balakhonov_danila_lab_3/docker-compose.yaml b/balakhonov_danila_lab_3/docker-compose.yaml index fd9a5dc..8a1d306 100644 --- a/balakhonov_danila_lab_3/docker-compose.yaml +++ b/balakhonov_danila_lab_3/docker-compose.yaml @@ -1,17 +1,15 @@ services: - restaurant-service: + restaurant_service: build: ./ApiRestaurant/ - container_name: restaurant environment: - WAITER_API_URL: http://waiter-service:4000 + WAITER_API_URL: http://localhost:80/waiters/ expose: - 8080 depends_on: - - waiter-service + - waiter_service - waiter-service: + waiter_service: build: ./ApiWaiter/ - container_name: waiter environment: PORT: 4000 expose: @@ -20,8 +18,8 @@ services: nginx: image: nginx depends_on: - - restaurant-service - - waiter-service + - restaurant_service + - waiter_service ports: - "80:80" volumes: diff --git a/balakhonov_danila_lab_3/nginx.conf b/balakhonov_danila_lab_3/nginx.conf index 742d868..3595927 100644 --- a/balakhonov_danila_lab_3/nginx.conf +++ b/balakhonov_danila_lab_3/nginx.conf @@ -9,7 +9,7 @@ http { server_name localhost; location /waiters/ { - proxy_pass http://waiter:4000/; + proxy_pass http://waiter_service:4000/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; @@ -17,7 +17,7 @@ http { } location /restaurants/ { - proxy_pass http://restaurant:8080/; + proxy_pass http://restaurant_service:8080/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto $scheme;