dockerEnv/docker-compose.yml

100 lines
2.5 KiB
YAML
Raw Normal View History

2020-10-05 15:25:03 +00:00
version: '3.8'
2018-06-08 13:59:49 +00:00
services:
consul:
image: consul
2018-09-29 11:01:06 +00:00
restart: always
2020-10-05 15:25:03 +00:00
container_name: consul
2018-09-29 21:08:41 +00:00
command: consul agent -server -dev -client=0.0.0.0 -ui -bootstrap -log-level warn -datacenter dev
2018-06-08 13:59:49 +00:00
environment:
SERVICE_8400_NAME: consul
SERVICE_8500_NAME: consul
SERVICE_8600_NAME: consul
SERVICE_8301_NAME: consul
SERVICE_8300_NAME: consul
SERVICE_8302_NAME: consul
ports:
- "8400:8400"
- "8500:8500"
- "8600:8600/udp"
2020-10-05 15:25:03 +00:00
expose:
- "8500"
networks:
- inbound
labels:
- "traefik.docker.network=inbound"
- "traefik.http.routers.consul.rule=Host(`consul.docker.localhost`)"
- "traefik.http.routers.consul.service=consul"
- "traefik.http.services.consul.loadbalancer.server.port=8500"
2018-06-08 13:59:49 +00:00
registrator:
2018-09-29 11:01:06 +00:00
restart: always
2020-10-05 15:25:03 +00:00
container_name: registrator
2018-06-08 13:59:49 +00:00
depends_on:
- consul
image: gliderlabs/registrator:master
2018-12-16 12:09:43 +00:00
command: -ttl=120 -ttl-refresh=10 -cleanup=true -resync=10 -internal consul://consul:8500
2018-06-08 13:59:49 +00:00
volumes:
- /var/run/docker.sock:/tmp/docker.sock
2020-10-05 15:25:03 +00:00
networks:
- inbound
2018-06-08 13:59:49 +00:00
links:
- consul
environment:
SERVICE_NAME: registrator
2018-09-29 11:01:06 +00:00
portainer:
restart: always
2020-10-05 15:25:03 +00:00
container_name: portainer
image: portainer/portainer-ce:latest
2018-09-29 11:01:06 +00:00
command: -H unix:///var/run/docker.sock
volumes:
- /var/run/docker.sock:/var/run/docker.sock
2018-12-16 12:09:43 +00:00
- ./storage/portainer:/data
2020-10-05 15:25:03 +00:00
networks:
- inbound
labels:
- "traefik.docker.network=inbound"
- "traefik.http.routers.portainer.rule=Host(`portainer.docker.localhost`)"
- "traefik.http.routers.portainer.service=portainer"
- "traefik.http.services.portainer.loadbalancer.server.port=9000"
2018-09-29 11:01:06 +00:00
2020-10-05 15:25:03 +00:00
traefik:
image: traefik:latest
2020-10-05 16:12:41 +00:00
container_name: traefik
2018-11-28 17:35:25 +00:00
restart: always
2020-10-05 15:25:03 +00:00
networks:
- traefik
- inbound
2018-11-28 17:31:14 +00:00
volumes:
2020-10-05 15:25:03 +00:00
- ./configs/traefik.yml:/etc/traefik/traefik.yml
- /var/run/docker.sock:/var/run/docker.sock
2018-11-28 17:31:14 +00:00
ports:
2020-10-05 15:25:03 +00:00
- target: 80
published: 80
mode: host
- target: 443
published: 443
mode: host
- target: 8080
published: 8090
protocol: tcp
mode: ingress
labels:
- "traefik.http.routers.api.rule=Host(`traefik.docker.localhost`)"
- "traefik.http.routers.api.service=api@internal"
networks:
traefik:
driver: bridge
name: traefik
inbound:
driver: bridge
name: inbound
2018-11-28 17:31:14 +00:00
2020-10-05 15:25:03 +00:00
configs:
traefik_config:
file: ./configs/traefik.yml