Created
January 22, 2021 18:56
-
-
Save jhuesser/af3a79b91153b0ba180683b6a40d106e to your computer and use it in GitHub Desktop.
docker compose let's encrypt Nginx
This file contains 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' | |
networks: | |
ext: | |
volumes: | |
certs: | |
vhosts: | |
html: | |
services: | |
nginxproxy: | |
image: jwilder/nginx-proxy | |
container_name: nginxproxy | |
hostname: nginxproxy | |
restart: unless-stopped | |
networks: | |
- ext | |
volumes: | |
- certs:/etc/nginx/certs:ro | |
- vhosts:/etc/nginx/vhost.d | |
- html:/usr/share/nginx/html | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
ports: | |
- 80:80 | |
- 443:443 | |
labels: | |
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy | |
nginxproxy_comp: | |
image: jrcs/letsencrypt-nginx-proxy-companion | |
container_name: nginxproxy_comp | |
hostname: nginxproxy_comp | |
restart: unless-stopped | |
depends_on: | |
- nginxproxy | |
networks: | |
- ext | |
volumes: | |
- certs:/etc/nginx/certs | |
- /var/run/docker.sock:/var/run/docker.sock:ro | |
- vhosts:/etc/nginx/vhost.d | |
- html:/usr/share/nginx/html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment