-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from praxxus11/add-nginx
Add nginx
- Loading branch information
Showing
5 changed files
with
75 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,23 @@ | ||
services: | ||
gateway: | ||
container_name: gateway | ||
image: registry.gitlab.com/segmentation964330/service/gateway | ||
build: | ||
context: ./gateway | ||
ports: | ||
- "80:8000" | ||
volumes: | ||
- ./artifacts/images:/home/artifacts/images | ||
- ./artifacts/logs:/home/artifacts/logs | ||
- ./artifacts/models:/home/artifacts/models | ||
tty: true | ||
stdin_open: false | ||
stdin_open: true | ||
nginx: | ||
container_name: nginx | ||
image: registry.gitlab.com/segmentation964330/service/nginx | ||
build: | ||
context: ./nginx | ||
ports: | ||
- "80:80" | ||
depends_on: | ||
- gateway | ||
tty: true | ||
stdin_open: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM nginx:1.27.0-alpine3.19 | ||
RUN rm /etc/nginx/conf.d/default.conf | ||
COPY ./gateway.conf /etc/nginx/conf.d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
upstream segmentation_gateways { | ||
# Docker container with name gateway must be running | ||
server gateway:8000; | ||
} | ||
|
||
server { | ||
listen 80; | ||
|
||
location / { | ||
proxy_pass http://segmentation_gateways; | ||
|
||
proxy_set_header Host $http_host; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
} |