Last active
March 5, 2021 17:33
-
-
Save jincod/bd5a1e31099e9109874e38ec861c0391 to your computer and use it in GitHub Desktop.
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
version: "3" | |
services: | |
nginx: | |
image: nginx:1.19-alpine | |
container_name: nginx | |
restart: always | |
ports: | |
- 80:80 | |
- 443:443 | |
volumes: | |
- ./nginx.conf:/etc/nginx/nginx.conf:ro | |
backend: | |
image: private-docker-registry.com | |
container_name: backend | |
restart: always |
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
erver { | |
listen 443 ssl; | |
server_name domain.com; | |
include "/etc/nginx/conf.d/inc/ssl.conf"; | |
location /api { | |
proxy_pass http://backend; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $http_connection; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment