Skip to content

Instantly share code, notes, and snippets.

@alo9507
Created October 24, 2020 20:52
Show Gist options
  • Save alo9507/bc35d5b3fe0e3f8fadb0a68263296d08 to your computer and use it in GitHub Desktop.
Save alo9507/bc35d5b3fe0e3f8fadb0a68263296d08 to your computer and use it in GitHub Desktop.
upstream client {
server client:3000;
}
upstream api {
server api:3001;
}
server {
listen 80;
location / {
proxy_pass http://client;
proxy_set_header Host $host;
}
location /sockjs-node {
proxy_pass http://client;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
location /api {
rewrite /api/(.*) /$1 break;
proxy_pass http://api;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment