forked from sablierapp/sablier
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
65 lines (61 loc) · 2.69 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
version: "3.7"
services:
traefik:
image: traefik
entrypoint: sh -c "sed 's/$$TRAEFIK_PILOT_TOKEN/$TRAEFIK_PILOT_TOKEN/' /etc/traefik/traefik-template.yml > /etc/traefik/traefik.yml && traefik"
ports:
- "8000:80"
- "8080:8080"
volumes:
- './traefik_dev.yml:/etc/traefik/traefik-template.yml'
- '/var/run/docker.sock:/var/run/docker.sock'
- '.:/plugins-local/src/github.com/acouvreur/traefik-ondemand-plugin'
environment:
- TRAEFIK_PILOT_TOKEN
deploy:
labels:
- traefik.enable=true
- traefik.http.services.traefik.loadbalancer.server.port=8080
ondemand:
image: ghcr.io/acouvreur/traefik-ondemand-service:1.7
command:
- --swarmMode=true
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
whoami:
image: containous/whoami
deploy:
replicas: 0
labels:
- traefik.enable=true
# If you do not use the swarm load balancer, traefik will evict the service from its pool
# as soon as the service is 0/0. If you do not set that, fallback to dynamic-config.yml file usage.
- traefik.docker.lbswarm=true
- traefik.http.middlewares.ondemand_whoami.plugin.traefik-ondemand-plugin.name=TRAEFIK_HACKATHON_whoami
- traefik.http.middlewares.ondemand_whoami.plugin.traefik-ondemand-plugin.serviceurl=http://ondemand:10000
- traefik.http.middlewares.ondemand_whoami.plugin.traefik-ondemand-plugin.timeout=1m
- traefik.http.routers.whoami.middlewares=ondemand_whoami@docker
- traefik.http.routers.whoami.rule=PathPrefix(`/whoami`)
- traefik.http.services.whoami.loadbalancer.server.port=80
nginx:
image: nginx
healthcheck:
test: "true"
interval: 1m30s
timeout: 30s
retries: 5
start_period: 30s
deploy:
replicas: 0
labels:
- traefik.enable=true
# If you do not use the swarm load balancer, traefik will evict the service from its pool
# as soon as the service is 0/0. If you do not set that, fallback to dynamic-config.yml file usage.
- traefik.docker.lbswarm=true
- traefik.http.middlewares.ondemand_nginx.plugin.traefik-ondemand-plugin.name=TRAEFIK_HACKATHON_nginx
- traefik.http.middlewares.ondemand_nginx.plugin.traefik-ondemand-plugin.serviceurl=http://ondemand:10000
- traefik.http.middlewares.ondemand_nginx.plugin.traefik-ondemand-plugin.timeout=5m
- traefik.http.middlewares.ondemand_nginx.plugin.traefik-ondemand-plugin.waitui=false
- traefik.http.routers.nginx.middlewares=ondemand_nginx@docker
- traefik.http.routers.nginx.rule=PathPrefix(`/nginx`)
- traefik.http.services.nginx.loadbalancer.server.port=80