Files
sablier/docker-compose.yml
Alexis Couvreur b4f5eebaac feat: add blocking request (#12)
* feat: add blocking strategy

* docs: add examples for blocking strategy

* ci: run go tests recursively

* perf: wait for BlockCheckInterval for each request

* fix: use camel case instead of snake case for yaml config

* docs: add loading and error page customization as a feature

* fix: use errorPage

* fix: return json instead of html page

* set json key

* update development config

* docs: add comment about custom loading pages

* ci: add beta release
2021-12-11 15:46:56 +01:00

65 lines
2.7 KiB
YAML

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