Skip to content

Instantly share code, notes, and snippets.

@bandwith
Created March 28, 2017 18:45
Show Gist options
  • Save bandwith/5736bcf7384e933b1a6453bbd6e16afa to your computer and use it in GitHub Desktop.
Save bandwith/5736bcf7384e933b1a6453bbd6e16afa to your computer and use it in GitHub Desktop.
working config
version: '2'
services:
rancher-ui:
image: 'rancher/server'
container_name: rancher-ui
command: --advertise-address rancher --advertise-http-port 8080
restart: always
depends_on:
- mariadb
ports:
- 8080:8080
- 9345:9345
environment:
- VIRTUAL_HOST=rancher
- VIRTUAL_PORT=8080
- CATTLE_DB_CATTLE_MYSQL_HOST=mariadb
- CATTLE_DB_CATTLE_MYSQL_PORT=3306
- CATTLE_DB_CATTLE_MYSQL_NAME=cattle
- CATTLE_DB_CATTLE_USERNAME=cattle
- CATTLE_DB_CATTLE_PASSWORD=cattle
nginx-proxy:
image: 'jwilder/nginx-proxy'
container_name: nginx-proxy
restart: always
ports:
- 80:80
- 443:443
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
mariadb:
image: 'mariadb:latest'
container_name: mariadb
restart: always
ports:
- 3306
volumes:
- data-mariadb:/var/lib/mysql
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
- MYSQL_USER=cattle
- MYSQL_PASSWORD=cattle
- MYSQL_DATABASE=cattle
volumes:
data-mariadb:
external: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment