forked from Nixius/authelia
1
0
Fork 0
ATLAS/docker/ss-atlas/templates/stack-template.yml

43 lines
1.7 KiB
YAML

# =============================================================================
# CUSTOMER STACK TEMPLATE — Uptime Kuma
# =============================================================================
# Single-service stack for each paying customer. Simple webapp for testing
# routing and auth at https://{{.Domain}}/i/{{.Subdomain}}
#
# Traefik: priority 10 ensures /i/{{.Subdomain}} always hits this stack, not
# ss-atlas (priority 1). Strip prefix sends e.g. /i/user/foo -> /foo to the app.
#
# Template variables (injected by swarm/client.go):
# {{.ID}}, {{.Subdomain}}, {{.Domain}}, {{.TraefikNetwork}}
# =============================================================================
services:
web:
image: louislam/uptime-kuma:2
volumes:
- app_data:/app/data
networks:
- traefik_net
deploy:
replicas: 1
labels:
traefik.enable: "true"
traefik.docker.network: "atlas_{{.TraefikNetwork}}"
traefik.http.routers.customer-{{.ID}}-web.rule: "Host(`{{.Domain}}`) && PathPrefix(`/i/{{.Subdomain}}`)"
traefik.http.routers.customer-{{.ID}}-web.entrypoints: "websecure"
traefik.http.routers.customer-{{.ID}}-web.priority: "10"
traefik.http.routers.customer-{{.ID}}-web.tls: "true"
traefik.http.routers.customer-{{.ID}}-web.middlewares: "strip-customer-{{.ID}}@swarm,authelia-auth@swarm"
traefik.http.middlewares.strip-customer-{{.ID}}.stripprefix.prefixes: "/i/{{.Subdomain}}"
traefik.http.services.customer-{{.ID}}-web.loadbalancer.server.port: "3001"
restart_policy:
condition: on-failure
networks:
traefik_net:
external: true
name: "atlas_{{.TraefikNetwork}}"
volumes:
app_data:
driver: local