Created
November 26, 2021 07:30
-
-
Save siteslave/bd8bbc316f7fd619eafa4d1cf28a487c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
version: "3" | |
services: | |
api: | |
image: "registry.gitlab.com/moph-training/surat/api:latest" | |
container_name: "api" | |
ports: | |
- 3000:3000 | |
volumes: | |
- ./config/env:/home/api/config/env | |
restart: always | |
web: | |
image: "registry.gitlab.com/moph-training/surat/web:latest" | |
container_name: "web" | |
ports: | |
- 3001:80 | |
restart: always |
nginx.conf
location /covid/ {
proxy_pass http://localhost:3001;
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;
proxy_set_header X-NginX-Proxy true;
proxy_redirect off;
include /etc/nginx/mime.types;
rewrite ^/covid/(.*)$ /$1 break;
}
location /api/covid/ {
limit_req zone=apilimit burst=5;
proxy_pass http://localhost:3000;
rewrite ^/api/covid/(.*)$ /$1 break;
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
config/env