diff --git a/balakhonov_danila_lab_3/ApiRestaurant/Dockerfile b/balakhonov_danila_lab_3/ApiRestaurant/Dockerfile index 5809cb3..b11051a 100644 --- a/balakhonov_danila_lab_3/ApiRestaurant/Dockerfile +++ b/balakhonov_danila_lab_3/ApiRestaurant/Dockerfile @@ -8,7 +8,8 @@ RUN dotnet restore # Build and publish a release RUN dotnet publish -c Release -o out -FROM mcr.microsoft.com/dotnet/runtime:8.0 AS runtime +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS app +ENV ASPNETCORE_URLS=http://*:5089 WORKDIR /App COPY --from=build /App/out . ENTRYPOINT ["dotnet", "ApiRestaurant.dll"] \ No newline at end of file diff --git a/balakhonov_danila_lab_3/nginx.conf b/balakhonov_danila_lab_3/nginx.conf index 6580d1c..7c83869 100644 --- a/balakhonov_danila_lab_3/nginx.conf +++ b/balakhonov_danila_lab_3/nginx.conf @@ -1,21 +1,23 @@ -server { - listen 80; - listen [::]:80; - server_name localhost; +http { + server { + listen 80; + listen [::]:80; + server_name localhost; - 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 /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:5089/; - 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; + location /restaurants/ { + proxy_pass http://restaurant-service:5089/; + 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; + } } }