Skip to content

Instantly share code, notes, and snippets.

@jincod
Last active March 5, 2021 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jincod/bd5a1e31099e9109874e38ec861c0391 to your computer and use it in GitHub Desktop.
Save jincod/bd5a1e31099e9109874e38ec861c0391 to your computer and use it in GitHub Desktop.
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
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