Created
May 22, 2018 06:22
-
-
Save zaverden/1a98d8d273accf1ba02ee3138cf91c67 to your computer and use it in GitHub Desktop.
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
CERTS_PATH="/path/to/certs" | |
HOST="my.example.com" | |
EMAIL="email@example.com" | |
DOCKER_SOCK="/var/run/docker.sock" | |
docker run \ | |
--name nginx-proxy \ | |
--detach=true \ | |
--publish 80:80 \ | |
--publish 443:443 \ | |
--volume $CERTS_PATH:/etc/nginx/certs:ro \ | |
--volume /etc/nginx/vhost.d \ | |
--volume /usr/share/nginx/html \ | |
--volume $DOCKER_SOCK:/tmp/docker.sock:ro \ | |
--label com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy \ | |
jwilder/nginx-proxy | |
docker run \ | |
--name nginx-proxy-letsencrypt \ | |
--detach=true \ | |
--volume $CERTS_PATH:/etc/nginx/certs:rw \ | |
--volume $DOCKER_SOCK:$DOCKER_SOCK:ro \ | |
--volumes-from nginx-proxy \ | |
jrcs/letsencrypt-nginx-proxy-companion | |
docker run \ | |
--detach=true \ | |
--expose 3000 \ | |
--publish 3000:3000 \ | |
--env VIRTUAL_HOST=$HOST \ | |
--env LETSENCRYPT_HOST=$HOST \ | |
--env LETSENCRYPT_EMAIL=$EMAIL \ | |
node:8-alpine node -e "require('http').createServer((req, res)=>res.write('Hello World',()=>res.end())).listen(3000);" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment