Files
sablier/plugins/caddy/e2e/docker_swarm/Caddyfile
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

73 lines
1.4 KiB
Caddyfile

:80 {
route /dynamic/whoami {
sablier http://tasks.sablier:10000 {
names DOCKER_SWARM_E2E_whoami
session_duration 1m
dynamic {
display_name Dynamic Whoami
theme hacker-terminal
}
}
reverse_proxy whoami:80
}
route /blocking/whoami {
sablier http://tasks.sablier:10000 {
names DOCKER_SWARM_E2E_whoami
session_duration 1m
blocking {
timeout 30s
}
}
reverse_proxy whoami:80
}
route /multiple/whoami {
sablier http://tasks.sablier:10000 {
names DOCKER_SWARM_E2E_whoami DOCKER_SWARM_E2E_nginx
session_duration 1m
dynamic {
display_name Multiple Whoami
theme=hacker-terminal
}
}
reverse_proxy whoami:80
}
route /multiple/nginx {
sablier http://tasks.sablier:10000 {
names DOCKER_SWARM_E2E_whoami DOCKER_SWARM_E2E_nginx
session_duration 1m
dynamic {
display_name Multiple Whoami
theme=hacker-terminal
}
}
reverse_proxy nginx:80
}
route /healthy/nginx {
sablier http://tasks.sablier:10000 {
names DOCKER_SWARM_E2E_nginx
session_duration 1m
dynamic {
display_name Healthy Nginx
theme hacker-terminal
}
}
reverse_proxy nginx:80
}
route /group {
sablier http://sablier:10000 {
group E2E
session_duration 1m
dynamic {
display_name Group E2E
theme hacker-terminal
}
}
reverse_proxy whoami:80
}
}