-
-
Save alexandre2602/3f60d245aa0d4193f357833d48a8a0c5 to your computer and use it in GitHub Desktop.
Revisions
-
w33ble revised this gist
Feb 8, 2020 . 2 changed files with 64 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,63 @@ version: '3' services: nginx-proxy: image: nginx:alpine container_name: proxy-nginx environment: - DEFAULT_HOST=hello.local ports: - 80:80 - 443:443 volumes: - conf:/etc/nginx/conf.d:ro - vhost:/etc/nginx/vhost.d:ro - html:/usr/share/nginx/html:ro - certs:/etc/nginx/certs:ro dockergen: image: jwilder/docker-gen container_name: proxy-dockergen command: -notify-sighup proxy-nginx -wait 5s:30s -watch /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf volumes: - /var/run/docker.sock:/tmp/docker.sock:ro - ./templates:/etc/docker-gen/templates:rw # curl -o templates/nginx.tmpl https://raw.githubusercontent.com/jwilder/nginx-proxy/master/nginx.tmpl - conf:/etc/nginx/conf.d - vhost:/etc/nginx/vhost.d:ro - html:/usr/share/nginx/html - certs:/etc/nginx/certs:ro environment: - DEFAULT_HOST=hello.local letsencrypt: image: jrcs/letsencrypt-nginx-proxy-companion container_name: proxy-letsencrypt volumes: - /var/run/docker.sock:/var/run/docker.sock:ro - ./templates:/etc/docker-gen/templates:ro - conf:/etc/nginx/conf.d - vhost:/etc/nginx/vhost.d - html:/usr/share/nginx/html - certs:/etc/nginx/certs environment: - [email protected] - NGINX_PROXY_CONTAINER=proxy-nginx - NGINX_DOCKER_GEN_CONTAINER=proxy-dockergen hello: image: nginx:alpine environment: - VIRTUAL_HOST=hello.local volumes: - ./index.html:/usr/share/nginx/html/index.html networks: default: external: name: nginx-proxy volumes: conf: certs: vhost: html: This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -16,10 +16,8 @@ services: - /var/run/docker.sock:/tmp/docker.sock:ro hello: image: nginx:alpine environment: - VIRTUAL_HOST=hello.local volumes: - ./index.html:/usr/share/nginx/html/index.html -
w33ble revised this gist
Feb 8, 2020 . 3 changed files with 14 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,13 @@ version: '3' services: thing: image: jwilder/whoami environment: - VIRTUAL_PORT=8000 - VIRTUAL_HOST=whoami.local # in order for the proxy to see this service, it needs to be on the same network networks: default: external: name: nginx-proxy This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,9 @@ version: '3' networks: default: external: name: nginx-proxy services: nginx-proxy: @@ -12,8 +14,6 @@ services: - 80:80 volumes: - /var/run/docker.sock:/tmp/docker.sock:ro hello: image: nginx:1-alpine @@ -23,5 +23,3 @@ services: - ./index.html:/usr/share/nginx/html/index.html ports: - 8080:80 This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ $ curl -H "Host: whoami.local" localhost -
w33ble revised this gist
Jan 3, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,6 @@ version: '3' services: thing: # in order for the proxy to see this service, it needs to be on the same network networks: - nginx_nginx-proxy -
w33ble created this gist
Jan 3, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ version: '3' services: thing: # in order for the proxy to see networks: - nginx_nginx-proxy This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ version: '3' networks: nginx-proxy: services: nginx-proxy: image: jwilder/nginx-proxy environment: - DEFAULT_HOST=hello.local ports: - 80:80 volumes: - /var/run/docker.sock:/tmp/docker.sock:ro networks: - nginx-proxy hello: image: nginx:1-alpine environment: - VIRTUAL_HOST=hello.local volumes: - ./index.html:/usr/share/nginx/html/index.html ports: - 8080:80 networks: - nginx-proxy