Created
September 5, 2018 01:40
-
-
Save alejobit/2586ac2f83e1a4a23b7b296a8fcebbe3 to your computer and use it in GitHub Desktop.
nginx-proxy + letsencrypt-nginx-proxy-companion
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
docker run -d -p 80:80 -p 443:443 \ | |
--name nginx-proxy \ | |
-v /opt/nginx/certs:/etc/nginx/certs:ro \ | |
-v /etc/nginx/vhost.d \ | |
-v /usr/share/nginx/html \ | |
-v /var/run/docker.sock:/tmp/docker.sock:ro \ | |
--label com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy \ | |
jwilder/nginx-proxy:alpine | |
docker run -d \ | |
--name letsencrypt-nginx-proxy-companion \ | |
-v /opt/nginx/certs:/etc/nginx/certs:rw \ | |
-v /var/run/docker.sock:/var/run/docker.sock:ro \ | |
--volumes-from nginx-proxy \ | |
jrcs/letsencrypt-nginx-proxy-companion | |
docker run -d \ | |
--name static \ | |
-e VIRTUAL_HOST=static.emc2it.co \ | |
-e LETSENCRYPT_HOST=static.emc2it.co \ | |
-e [email protected] \ | |
-v /home/alejobit/static:/usr/share/nginx/html:ro \ | |
nginx:alpine |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment