Files
sablier/plugins/caddy/e2e/docker_swarm/docker-stack.yml
Alexis Couvreur dfb9bacf59 feat(providers): add provider.auto-stop-on-startup argument (#346)
This feature adds the capability to stop unregistered running instances upon startup.

Previously, you had to stop running instances manually or issue an initial request that will shut down instances afterwards.

With this change, all discovered instances will be shutdown. They need to be registered using labels. E.g.: sablier.enable=true

Fixes #153
2024-10-01 17:30:14 -07:00

43 lines
917 B
YAML

version: "3.7"
services:
proxy:
image: caddy:local
ports:
- target: 80
published: 8080
protocol: tcp
mode: host # Won't work in github actions otherwise
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
deploy:
restart_policy:
condition: none # Do not restart on setup failure
sablier:
image: acouvreur/sablier:local
command:
- start
- --provider.name=swarm
- --logging.level=trace
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
whoami:
image: containous/whoami:v1.5.0
deploy:
labels:
- sablier.enable=true
- sablier.group=E2E
replicas: 0
nginx:
image: nginx:1.23.1
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
interval: 5s
deploy:
labels:
- sablier.enable=true
- sablier.group=E2E
replicas: 0