Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This is a cloud-config file template for Rancher OS. Fill in the blanks and it'll automatically setup your Rancher Server behind an Nginx proxy and register Let's Encrypt SSL certs and then renew them automatically
#cloud-config
ssh_authorized_keys:
- ssh-rsa <my-public-key>
rancher:
services:
nginx-proxy:
image: jwilder/nginx-proxy:0.4.0
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- '/home/docker/nginx-proxy/ssl:/etc/nginx/certs:ro'
- '/etc/nginx/vhost.d'
- '/usr/share/nginx/html'
- '/var/run/docker.sock:/tmp/docker.sock:ro'
letsencrypt-nginx-proxy-companion:
image: jrcs/letsencrypt-nginx-proxy-companion:v1.3
restart: unless-stopped
volumes_from:
- nginx-proxy
volumes:
- '/home/docker/nginx-proxy/ssl:/etc/nginx/certs:rw'
- '/var/run/docker.sock:/var/run/docker.sock:ro'
rancher-server:
image: rancher/server:v1.2.0-pre3
restart: unless-stopped
environment:
- VIRTUAL_PORT=8080
- VIRTUAL_HOST=<my.domain.com>
- LETSENCRYPT_TEST=false
- LETSENCRYPT_HOST=<my.domain.com>
- LETSENCRYPT_EMAIL=<myemail@com>
- CATTLE_DB_CATTLE_MYSQL_HOST=<mysql-ip-or-hostname>
- CATTLE_DB_CATTLE_MYSQL_PORT=<mysql-port>
- CATTLE_DB_CATTLE_MYSQL_NAME=<mysql-schema-name>
- CATTLE_DB_CATTLE_USERNAME=<mysql-user>
- CATTLE_DB_CATTLE_PASSWORD=<my-sql-pass>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.