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

53 lines
2.0 KiB
YAML

# =============================================================================
# CUSTOMER STACK TEMPLATE — Uptime Kuma
# =============================================================================
# This is the Docker Swarm stack that gets deployed for each paying customer.
# It defines what product/service they receive when they subscribe.
#
# PRODUCT: Uptime Kuma — a self-hosted uptime/monitoring dashboard.
# Each customer gets their own isolated instance at their subdomain.
#
# To sell a different product, replace the `web` service image and adjust
# the port in the Traefik loadbalancer label accordingly.
#
# Template variables (injected at deploy time by swarm/client.go):
# {{.ID}} - customer's username (used for unique resource naming)
# {{.Subdomain}} - customer's subdomain (same as ID by default)
# {{.Domain}} - base domain (e.g. bc.a250.ca)
# {{.TraefikNetwork}} - Traefik overlay network name
#
# Each customer gets their stack at: https://{{.Subdomain}}.{{.Domain}}
# Access is restricted to the owning user via Authelia forward-auth.
# =============================================================================
version: "3.8"
services:
web:
image: louislam/uptime-kuma:1
volumes:
- uptime_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(`{{.Subdomain}}.{{.Domain}}`)"
traefik.http.routers.customer-{{.ID}}-web.entrypoints: "websecure"
traefik.http.routers.customer-{{.ID}}-web.tls: "true"
traefik.http.routers.customer-{{.ID}}-web.middlewares: "authelia-auth@swarm"
traefik.http.services.customer-{{.ID}}-web.loadbalancer.server.port: "3001"
restart_policy:
condition: on-failure
networks:
traefik_net:
external: true
name: "atlas_{{.TraefikNetwork}}"
volumes:
uptime_data:
driver: local