Skip to content

Instantly share code, notes, and snippets.

@jshimko
Created Jan 16, 2017
Embed
What would you like to do?
Rancher 1.3 deployment
# start a server on AWS
# (see docs for options)
# https://docs.docker.com/machine/drivers/aws/
docker-machine create --driver amazonec2 \
--amazonec2-access-key <YOUR ACCESS KEY> \
--amazonec2-secret-key <YOUR SECRET KEY> \
--amazonec2-instance-type t2.medium \
rancher-test
# Nginx
# https://github.com/jwilder/nginx-proxy
docker run -d -p 80:80 -p 443:443 \
--name nginx-proxy \
-v /opt/certs:/etc/nginx/certs:ro \
-v /etc/nginx/vhost.d \
-v /usr/share/nginx/html \
-v /var/run/docker.sock:/tmp/docker.sock:ro \
jshimko/nginx-proxy:latest
# Let's Encrypt
# https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion
docker run -d \
-v /opt/certs:/etc/nginx/certs:rw \
--volumes-from nginx-proxy \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
jrcs/letsencrypt-nginx-proxy-companion:latest
# Rancher 1.3.0
# choose a domain name that will already resolve to your machine IP
# and use it for VIRTUAL_HOST and LETSENCRYPT_HOST
docker run -d \
-e VIRTUAL_HOST="rancher.example.com" \
-e VIRTUAL_PORT="8080" \
-e LETSENCRYPT_EMAIL="you@example.com" \
-e LETSENCRYPT_HOST="rancher.example.com" \
rancher/server:v1.3.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment