-
-
Save pmoranga/6f4b1965898c3d413981e90d681ddeeb to your computer and use it in GitHub Desktop.
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
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
#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