Skip to content

Instantly share code, notes, and snippets.

@leozc
Last active August 6, 2016 08:47
Show Gist options
  • Select an option

  • Save leozc/574e555efeaeca8a3f56772f4eeafd40 to your computer and use it in GitHub Desktop.

Select an option

Save leozc/574e555efeaeca8a3f56772f4eeafd40 to your computer and use it in GitHub Desktop.
docker compose for linkerd
version: '2'
services:
nginx_1:
image: nginx
expose:
- "8001"
ports:
- '8001:80'
networks:
- "proxy"
environment:
- VIRTUAL_HOST=nginx_1
nginx_2:
image: nginx
expose:
- "8001"
ports:
- '8002:80'
networks:
- "proxy"
environment:
- VIRTUAL_HOST=nginx_2
linkerd:
image: buoyantio/linkerd:0.7.2
container_name: linkerd
ports: ["4140:4140", "9990:9990"]
volumes: ["${MONOREPO_ROOT}/build_support/bin/conf:/io.buoyant/linkerd/config:ro"]
command: /io.buoyant/linkerd/config/sample_linkerd.yml
namerd:
image: buoyantio/namerd:0.7.2
container_name: namerd
ports: ["4100:4100", "4180:4180", "9991:9991"]
volumes: ["${MONOREPO_ROOT}/build_support/bin/conf:/io.buoyant/linkerd/config:ro"]
command: /io.buoyant/linkerd/config/sample_namerd.yml
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
ports:
- "8888:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
consul1:
image: "progrium/consul:latest"
container_name: "consul1"
hostname: "consul1"
ports:
- "8400:8400"
- "8500:8500"
- "8600:53"
command: "-server -bootstrap-expect 3 -ui-dir /ui"
consul2:
image: "progrium/consul:latest"
container_name: "consul2"
hostname: "consul2"
expose:
- "8400"
- "8500"
- "8600"
command: "-server -join consul1"
depends_on:
- consul1
consul3:
image: "progrium/consul:latest"
container_name: "consul3"
hostname: "consul3"
expose:
- "8400"
- "8500"
- "8600"
command: "-server -join consul1"
depends_on:
- consul1
networks:
proxy:
external:
name: proxy_default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment