Created
November 21, 2018 14:15
-
-
Save enric1994/fc6d6be75f29d910f8c3a590e2e860e5 to your computer and use it in GitHub Desktop.
Docker Compose file to setup a HTTPS proxy that exposes a web server.
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' | |
| services: | |
| nginx-proxy: | |
| image: jwilder/nginx-proxy | |
| ports: | |
| # Check that the other applications are not using the ports 80 or 443 | |
| - "80:80" | |
| # By default this proxy redirects from the port 80 to the 443 | |
| - "443:443" | |
| volumes: | |
| - /var/run/docker.sock:/tmp/docker.sock:ro | |
| # Add test.domain.key and test.domain.crt to the certs folder | |
| # Where the first one is the private key and the second one is the certificate | |
| # The filename must match the domain | |
| - ./nginx/certs:/etc/nginx/certs | |
| nginx: | |
| image: nginx | |
| environment: | |
| # To run this example add this to your /etc/hosts file: | |
| # 127.0.0.1 test.domain | |
| - VIRTUAL_HOST=test.domain | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment