From a92cbe9b72b915d4833279c9266e093a4e72e87b Mon Sep 17 00:00:00 2001 From: Leopere Date: Tue, 3 Mar 2026 16:48:03 -0500 Subject: [PATCH] Add header to stack-template, force-update images on deploy - stack-template.yml: prominent comment explaining this is the product being sold and how to swap in the real application image - deploy-stack-dev.sh: force-update locally-built images after stack deploy so swarm always runs the freshly built container Made-with: Cursor --- docker/ss-atlas/templates/stack-template.yml | 19 +++++++++++++++++++ scripts/deploy-stack-dev.sh | 4 ++++ 2 files changed, 23 insertions(+) diff --git a/docker/ss-atlas/templates/stack-template.yml b/docker/ss-atlas/templates/stack-template.yml index 42aaad8..0f33c68 100644 --- a/docker/ss-atlas/templates/stack-template.yml +++ b/docker/ss-atlas/templates/stack-template.yml @@ -1,3 +1,22 @@ +# ============================================================================= +# CUSTOMER STACK TEMPLATE +# ============================================================================= +# This is the Docker Swarm stack that gets deployed for each paying customer. +# It defines what product/service they receive when they subscribe. +# +# REPLACE the `web` service image (currently traefik/whoami as a placeholder) +# with the actual application you are selling. +# +# 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: diff --git a/scripts/deploy-stack-dev.sh b/scripts/deploy-stack-dev.sh index d21982f..a66adc8 100755 --- a/scripts/deploy-stack-dev.sh +++ b/scripts/deploy-stack-dev.sh @@ -30,5 +30,9 @@ docker compose build \ echo "=== Deploying stack ===" docker stack deploy -c stack.yml atlas +echo "=== Force-updating local images ===" +docker service update --force --image atlas-ss-atlas:latest atlas_ss-atlas +docker service update --force --image git.nixc.us/a250/authelia:dev-authelia atlas_authelia + echo "" echo "=== Ready. Visit https://app.bc.a250.ca ==="