Last active
January 19, 2016 19:33
-
-
Save yurinnick/f7f29fd2ea6764b44bd1 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
zk: | |
image: bobrik/zookeeper | |
ports: | |
- 2181:2181 | |
environment: | |
ZK_CONFIG: tickTime=2000,initLimit=10,syncLimit=5,maxClientCnxns=128,forceSync=no,clientPort=2181 | |
ZK_ID: 1 | |
master: | |
image: mesosphere/mesos-master:0.26.0-0.2.145.ubuntu1404 | |
net: host | |
environment: | |
MESOS_ZK: zk://127.0.0.1:2181/mesos | |
MESOS_QUORUM: 1 | |
MESOS_CLUSTER: docker-compose | |
MESOS_WORK_DIR: /var/lib/mesos | |
slave-one: | |
image: mesosphere/mesos-slave:0.26.0-0.2.145.ubuntu1404 | |
net: host | |
pid: host | |
environment: | |
MESOS_MASTER: zk://127.0.0.1:2181/mesos | |
MESOS_CONTAINERIZERS: docker,mesos | |
# MESOS_HOSTNAME: SLAVE_IP_GOES_HERE | |
MESOS_PORT: 5051 | |
MESOS_RESOURCES: ports(*):[11000-11999] | |
volumes: | |
- /sys/fs/cgroup:/sys/fs/cgroup | |
- /usr/local/bin/docker:/usr/bin/docker | |
- /var/run/docker.sock:/var/run/docker.sock | |
# slave-two: | |
# image: mesosphere/mesos-slave:0.26.0-0.2.145.ubuntu1404 | |
# net: host | |
# pid: host | |
# environment: | |
# MESOS_MASTER: zk://127.0.0.1:2181/mesos | |
# MESOS_CONTAINERIZERS: docker,mesos | |
# # MESOS_HOSTNAME: SLAVE_IP_GOES_HERE | |
# MESOS_PORT: 5052 | |
# MESOS_RESOURCES: ports(*):[12000-12999] | |
# volumes: | |
# - /sys/fs/cgroup:/sys/fs/cgroup | |
# - /usr/local/bin/docker:/usr/bin/docker | |
# - /var/run/docker.sock:/var/run/docker.sock | |
marathon: | |
image: mesosphere/marathon:v0.14.0-RC1 | |
net: host | |
environment: | |
MARATHON_MASTER: zk://127.0.0.1:2181/mesos | |
MARATHON_DECLINE_OFFER_DURATION: 3600000 | |
MARATHON_EVENT_SUBSCRIBER: http_callback | |
consul-server: | |
image: gliderlabs/consul-server | |
net: host | |
command: -server -bootstrap | |
traefik: | |
image: emilevauge/traefik | |
ports: | |
- 8000:80 | |
- 8088:8080 | |
volumes: | |
- /home/docker/traefik.toml:/traefik.toml | |
# chronos: | |
# image: mesosphere/chronos:chronos-2.4.0-0.1.20151007110204.ubuntu1404-mesos-0.24.1-0.2.35.ubuntu1404 | |
# command: /usr/bin/chronos run_jar --http_port 8888 --master zk://127.0.0.1:2181/mesos --zk_hosts zk://127.0.0.1:2181/mesos | |
# net: host |
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
################################################################ | |
# Global configuration | |
################################################################ | |
# Reverse proxy port | |
# | |
# Optional | |
# Default: ":80" | |
# | |
# port = ":80" | |
# Timeout in seconds. | |
# Duration to give active requests a chance to finish during hot-reloads | |
# | |
# Optional | |
# Default: 10 | |
# | |
# graceTimeOut = 10 | |
# Traefik logs file | |
# If not defined, logs to stdout | |
# | |
# Optional | |
# | |
# traefikLogsFile = "log/traefik.log" | |
# Access logs file | |
# | |
# Optional | |
# | |
# accessLogsFile = "log/access.log" | |
# Log level | |
# | |
# Optional | |
# Default: "ERROR" | |
# | |
logLevel = "DEBUG" | |
# SSL certificates and keys | |
# You may add several certificate/key pairs to terminate HTTPS for multiple domain names using TLS SNI | |
# | |
# Optional | |
# | |
# [[certificates]] | |
# CertFile = "traefik.crt" | |
# KeyFile = "traefik.key" | |
# Backends throttle duration: minimum duration between 2 events from providers | |
# before applying a new configuration. It avoids unnecessary reloads if multiples events | |
# are sent in a short amount of time. | |
# | |
# Optional | |
# Default: "2s" | |
# | |
# ProvidersThrottleDuration = "5s" | |
################################################################ | |
# Web configuration backend | |
################################################################ | |
# Enable web configuration backend | |
# | |
# Optional | |
# | |
[web] | |
# Web administration port | |
# | |
# Required | |
# | |
address = ":8080" | |
# SSL certificate and key used | |
# | |
# Optional | |
# | |
# CertFile = "traefik.crt" | |
# KeyFile = "traefik.key" | |
################################################################ | |
# File configuration backend | |
################################################################ | |
# Enable file configuration backend | |
# | |
# Optional | |
# | |
# [file] | |
# Rules file | |
# If defined, traefik will load rules from this file, | |
# otherwise, it will load rules from current file (cf Sample rules below). | |
# | |
# Optional | |
# | |
# filename = "rules.toml" | |
# Enable watch file changes | |
# | |
# Optional | |
# | |
# watch = true | |
################################################################ | |
# Docker configuration backend | |
################################################################ | |
# Enable Docker configuration backend | |
# | |
# Optional | |
# | |
# [docker] | |
# Docker server endpoint. Can be a tcp or a unix socket endpoint. | |
# | |
# Required | |
# | |
# endpoint = "unix:///var/run/docker.sock" | |
# Default domain used. | |
# Can be overridden by setting the "traefik.domain" label on a container. | |
# | |
# Required | |
# | |
# domain = "docker.localhost" | |
# Enable watch docker changes | |
# | |
# Optional | |
# | |
# watch = true | |
# Override default configuration template. For advanced users :) | |
# | |
# Optional | |
# | |
# filename = "docker.tmpl" | |
# Enable docker TLS connection | |
# | |
# [docker.tls] | |
# ca = "/etc/ssl/ca.crt" | |
# cert = "/etc/ssl/docker.crt" | |
# key = "/etc/ssl/docker.key" | |
# insecureskipverify = true | |
################################################################ | |
# Mesos/Marathon configuration backend | |
################################################################ | |
# Enable Marathon configuration backend | |
# | |
# Optional | |
# | |
[marathon] | |
# Marathon server endpoint. | |
# You can also specify multiple endpoint for Marathon: | |
# endpoint := "http://10.241.1.71:8080,10.241.1.72:8080,10.241.1.73:8080" | |
# | |
# Required | |
# | |
endpoint = "http://192.168.99.100:8080" | |
# Network interface used to call Marathon web services. Needed in case of multiple network interfaces. | |
# Optional | |
# Default: "eth0" | |
# | |
networkInterface = "vboxnet0" | |
# Enable watch Marathon changes | |
# | |
# Optional | |
# | |
watch = true | |
# Default domain used. | |
# Can be overridden by setting the "traefik.domain" label on an application. | |
# | |
# Required | |
# | |
domain = "marathon.localhost" | |
# Override default configuration template. For advanced users :) | |
# | |
# Optional | |
# | |
# filename = "marathon.tmpl" | |
################################################################ | |
# Consul KV configuration backend | |
################################################################ | |
# Enable Consul KV configuration backend | |
# | |
# Optional | |
# | |
# [consul] | |
# Consul server endpoint | |
# | |
# Required | |
# | |
# endpoint = "127.0.0.1:8500" | |
# Enable watch Consul changes | |
# | |
# Optional | |
# | |
# watch = true | |
# Prefix used for KV store. | |
# | |
# Optional | |
# | |
# prefix = "/traefik" | |
# Override default configuration template. For advanced users :) | |
# | |
# Optional | |
# | |
# filename = "consul.tmpl" | |
################################################################ | |
# Etcd configuration backend | |
################################################################ | |
# Enable Etcd configuration backend | |
# | |
# Optional | |
# | |
# [etcd] | |
# Etcd server endpoint | |
# | |
# Required | |
# | |
# endpoint = "127.0.0.1:4001" | |
# Enable watch Etcd changes | |
# | |
# Optional | |
# | |
# watch = true | |
# Prefix used for KV store. | |
# | |
# Optional | |
# | |
# prefix = "/traefik" | |
# Override default configuration template. For advanced users :) | |
# | |
# Optional | |
# | |
# filename = "etcd.tmpl" | |
################################################################ | |
# Zookeeper configuration backend | |
################################################################ | |
# Enable Zookeeperconfiguration backend | |
# | |
# Optional | |
# | |
# [zookeeper] | |
# Zookeeper server endpoint | |
# | |
# Required | |
# | |
# endpoint = "127.0.0.1:2181" | |
# Enable watch Zookeeper changes | |
# | |
# Optional | |
# | |
# watch = true | |
# Prefix used for KV store. | |
# | |
# Optional | |
# | |
# prefix = "/traefik" | |
# Override default configuration template. For advanced users :) | |
# | |
# Optional | |
# | |
# filename = "zookeeper.tmpl" | |
################################################################ | |
# BoltDB configuration backend | |
################################################################ | |
# Enable BoltDB configuration backend | |
# | |
# Optional | |
# | |
# [boltdb] | |
# BoltDB file | |
# | |
# Required | |
# | |
# endpoint = "/my.db" | |
# Enable watch BoltDB changes | |
# | |
# Optional | |
# | |
# watch = true | |
# Prefix used for KV store. | |
# | |
# Optional | |
# | |
# prefix = "/traefik" | |
# Override default configuration template. For advanced users :) | |
# | |
# Optional | |
# | |
# filename = "boltdb.tmpl" | |
################################################################ | |
# Sample rules | |
################################################################ | |
# [backends] | |
# [backends.backend1] | |
# [backends.backend1.circuitbreaker] | |
# expression = "NetworkErrorRatio() > 0.5" | |
# [backends.backend1.servers.server1] | |
# url = "http://172.17.0.2:80" | |
# weight = 10 | |
# [backends.backend1.servers.server2] | |
# url = "http://172.17.0.3:80" | |
# weight = 1 | |
# [backends.backend2] | |
# [backends.backend2.LoadBalancer] | |
# method = "drr" | |
# [backends.backend2.servers.server1] | |
# url = "http://172.17.0.4:80" | |
# weight = 1 | |
# [backends.backend2.servers.server2] | |
# url = "http://172.17.0.5:80" | |
# weight = 2 | |
# | |
# [frontends] | |
# [frontends.frontend1] | |
# backend = "backend2" | |
# [frontends.frontend1.routes.test_1] | |
# rule = "Host" | |
# value = "test.localhost" | |
# [frontends.frontend2] | |
# backend = "backend1" | |
# passHostHeader = true | |
# [frontends.frontend2.routes.test_2] | |
# rule = "Path" | |
# value = "/test" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you are using docker-toolbox, then copy troefik.toml to docker machine first. Currently docker-machine doesn't support file passing with volumes.
docker-machine scp ./traefik.toml default:~/
Also change marathon endpoint adress if using different ip for docker machine.