Last active
February 15, 2021 20:15
-
-
Save clairmont32/1134f8fc1f556d6c1284d9597815e5cc to your computer and use it in GitHub Desktop.
Nginx Proxy with Multiple Web Services
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 characters
version: "3.9" | |
services: | |
nginx-proxy: | |
image: jwilder/nginx-proxy | |
ports: | |
- "80:80" | |
volumes: | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
staging: | |
image: httpd | |
ports: | |
- 80 | |
volumes: | |
- ./staging:/usr/local/apache2/htdocs | |
environment: | |
- "VIRTUAL_HOST=staging.localhost" | |
dev: | |
image: httpd | |
ports: | |
- 80 | |
volumes: | |
- ./dev:/usr/local/apache2/htdocs | |
environment: | |
- "VIRTUAL_HOST=dev.localhost" | |
prod: | |
image: httpd | |
ports: | |
- 80 | |
volumes: | |
- ./prod:/usr/local/apache2/htdocs | |
environment: | |
- "VIRTUAL_HOST=prod.localhost" | |
networks: | |
default: | |
external: | |
name: nginx-proxy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment