Skip to content

Instantly share code, notes, and snippets.

@riddla
Last active February 27, 2019 07:30
Show Gist options
  • Save riddla/dcb657b263943a85264e57dc14e45279 to your computer and use it in GitHub Desktop.
Save riddla/dcb657b263943a85264e57dc14e45279 to your computer and use it in GitHub Desktop.
Switch between localhost and container node application in "dockered" NGINX
upstream node-app {
# Enable this to use theserver running inside docker
# server node-app:3000;
# Enable this to use the (development) server running on your localhost
server host.docker.internal:3000;
}
server {
location / {
proxy_pass http://node-app;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment