balakhonov_danila_lab_3 #140

Merged
Alexey merged 16 commits from balakhonov_danila_lab_3 into main 2024-11-25 21:18:44 +04:00
3 changed files with 26 additions and 4 deletions
Showing only changes of commit 4fc879212e - Show all commits

View File

@ -6,6 +6,4 @@ RUN npm i
COPY . .
EXPOSE 4000
ENTRYPOINT ["npm", "run", "start"]

View File

@ -3,6 +3,8 @@ services:
build: ./ApiRestaurant/
environment:
WAITER_API_URL: http://waiter-service:4000
expose:
- 6666
depends_on:
- waiter-service
@ -10,8 +12,9 @@ services:
build: ./ApiWaiter/
environment:
PORT: 4000
ports:
- "4000:4000"
expose:
- 4000
nginx:
image: nginx

View File

@ -0,0 +1,21 @@
server {
listen 80;
listen [::]:80;
server_name restawaiters;
location /waiters/ {
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;
proxy_set_header X-Forwarded-Prefix /test;
}
location /restaurants/ {
proxy_pass http://restaurant-service:6666/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Prefix /admin;
}
}