Last active
January 21, 2017 08:23
-
-
Save klinkby/3c0b944892376dec67e98278d4a3b4de 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
#!/bin/bash | |
sudo docker pull nginx:alpine | |
sudo docker pull jwilder/docker-gen | |
sudo docker pull jrcs/letsencrypt-nginx-proxy-companion | |
sudo docker pull zzrot/alpine-ghost | |
wget https://raw.githubusercontent.com/jwilder/nginx-proxy/master/nginx.tmpl | |
sudo cp nginx.tmpl /volumes/proxy/templates/ | |
sudo docker run -d -p 80:80 -p 443:443 \ | |
--name nginx \ | |
--restart=unless-stopped \ | |
-v /etc/nginx/conf.d \ | |
-v /etc/nginx/vhost.d \ | |
-v /usr/share/nginx/html \ | |
-v $(pwd)/../../volumes/proxy/cache:/tmp/nginx:rw \ | |
-v $(pwd)/../../volumes/proxy/certs:/etc/nginx/certs:ro \ | |
-t nginx:alpine | |
sudo docker run -d \ | |
--name nginx-gen \ | |
--restart=unless-stopped \ | |
--volumes-from nginx \ | |
-v $(pwd)/../../volumes/proxy/templates/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro \ | |
-v /var/run/docker.sock:/tmp/docker.sock:ro \ | |
-t jwilder/docker-gen \ | |
-notify-sighup nginx \ | |
-watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf | |
sudo docker run -d \ | |
-e "NGINX_DOCKER_GEN_CONTAINER=nginx-gen" \ | |
--name letsencrypt \ | |
--restart=unless-stopped \ | |
-v $(pwd)/../../volumes/proxy/certs:/etc/nginx/certs:rw \ | |
--volumes-from nginx \ | |
-v /var/run/docker.sock:/var/run/docker.sock:ro \ | |
jrcs/letsencrypt-nginx-proxy-companion | |
sudo docker run -d -p 5000:2368 \ | |
-v /volumes/ghost:/var/lib/ghost/ \ | |
--name ghost \ | |
--restart=unless-stopped \ | |
-e "VIRTUAL_HOST=www.kli.dk" \ | |
-e "LETSENCRYPT_HOST=www.kli.dk" \ | |
-e "LETSENCRYPT_EMAIL=m@kli.dk" \ | |
-e "NODE_ENV=production" \ | |
-e "PROD_DOMAIN=https://www.kli.dk" \ | |
zzrot/alpine-ghost |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment