Last active
December 26, 2017 16:59
-
-
Save rjcorwin/e819c547d2a37e76bb8735843f44f6bd to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
DOMAIN="p2p.earth" | |
EMAIL="[email protected]" | |
echo "" | |
echo "Starting proxy and ssl companion." | |
echo "" | |
docker run -d -p 80:80 -p 443:443 \ | |
--name nginx-proxy \ | |
-v $(pwd)/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 | |
docker run -d \ | |
--name letsencrypt-nginx-proxy-companion \ | |
-v $(pwd)/certs:/etc/nginx/certs:rw \ | |
-v /var/run/docker.sock:/var/run/docker.sock:ro \ | |
--volumes-from nginx-proxy \ | |
jrcs/letsencrypt-nginx-proxy-companion | |
echo "" | |
echo "Sleeping while things start up..." | |
echo "" | |
sleep 60 | |
echo "" | |
echo "Starting the app." | |
echo "" | |
docker run -d \ | |
--name app \ | |
-e "LETSENCRYPT_HOST=$DOMAIN" \ | |
-e "VIRTUAL_HOST=$DOMAIN" \ | |
-e "LETSENCRYPT_EMAIL=$EMAIL" \ | |
nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I arrive this because @dogi
Still confuse about how you setup your
nginx.conf
?