Created
March 19, 2019 14:27
-
-
Save j-chimienti/7a6c84da5f157b6ae3ed6d7720d8b3b4 to your computer and use it in GitHub Desktop.
docker compose file to get nginx proxy and lets encrypt
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: '2' | |
services: | |
nginx: | |
restart: always | |
image: jwilder/nginx-proxy | |
container_name: nginx | |
ports: | |
- 80:80 | |
- 443:443 | |
networks: | |
- nginxproxy | |
volumes: | |
- /etc/nginx/certs | |
- /etc/nginx/vhost.d | |
- /usr/share/nginx/html | |
- /var/run/docker.sock:/tmp/docker.sock:ro | |
# - /data/letsencrypt-nginx-proxy-companion/certs/:/etc/nginx/certs:ro | |
letsencrypt-nginx-proxy-companion: | |
restart: always | |
image: jrcs/letsencrypt-nginx-proxy-companion | |
container_name: le | |
networks: | |
- nginxproxy | |
volumes_from: | |
- nginx | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock:ro | |
# - /data/letsencrypt-nginx-proxy-companion/certs/:/etc/nginx/certs:ro | |
# docker network create <net> | |
networks: | |
nginxproxy: | |
external: | |
name: nginxproxy | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment