Files
sablier/plugins/nginx/e2e/docker_swarm/docker-stack.yml
Alexis Couvreur 52a7d2195f 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-07-04 12:06:21 -04:00

45 lines
997 B
YAML

version: '3.9'
services:
proxy:
image: nginx:1.23.1
ports:
- target: 80
published: 8080
protocol: tcp
mode: host # Won't work in github actions otherwise
volumes:
# Used to load js module
- ../nginx.conf:/etc/nginx/nginx.conf
- ../../njs/sablier.js:/etc/nginx/conf.d/sablier.js
- ./nginx.conf:/etc/nginx/conf.d/default.conf
sablier:
image: acouvreur/sablier:local
ports:
- 10000:10000
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