Skip to content

Instantly share code, notes, and snippets.

@felipebn
Created January 11, 2018 11:01
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 felipebn/81672a3a71a95e1c7c2e53d4334ab42b to your computer and use it in GitHub Desktop.
Save felipebn/81672a3a71a95e1c7c2e53d4334ab42b to your computer and use it in GitHub Desktop.
Docker compose file to exemplify how to place a automatic reverse proxy in front of containers (WINDOWS)
version: '3.4'
services:
nginx-proxy:
image: jwilder/nginx-proxy
ports:
- "80:80"
environment:
#192.168.65.2 is (usually) the docker host, discovered by checking which networks were reachable from a container
- "DOCKER_HOST=tcp://192.168.65.2:2375"
whoami:
image: jwilder/whoami
environment:
- VIRTUAL_HOST=whoami.local
other:
image: jwilder/whoami
environment:
- VIRTUAL_HOST=other.local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment