diff --git a/docker/swarm/stacks/oncall/README.md b/docker/swarm/stacks/oncall/README.md index 702a7976d..b7361306f 100644 --- a/docker/swarm/stacks/oncall/README.md +++ b/docker/swarm/stacks/oncall/README.md @@ -13,12 +13,24 @@ This stack defines all the services for the housekeeping apps. See comments in t - Mount `/home/freecodecamp/.docker:/root/.docker` as **writable** (buildx needs write access) - Ensure `/home/freecodecamp/.docker/buildx/` directory exists on manager node +**Google Chat Notifications:** +- Create webhook in Google Chat: Space menu → Apps & integrations → Webhooks → Add webhook +- Set environment variable with webhook URL: +```bash +export GANTRY_GCHAT_WEBHOOK_URL="gchat://workspace/key/token" +# Or use direct URL: +export GANTRY_GCHAT_WEBHOOK_URL="https://chat.googleapis.com/v1/spaces/..." +``` + **Deployment:** ```bash # Ensure correct ownership and permissions sudo chown -R freecodecamp:freecodecamp /home/freecodecamp/.docker sudo chmod -R u+w /home/freecodecamp/.docker +# Set notification webhook (optional) +export GANTRY_GCHAT_WEBHOOK_URL="gchat://workspace/key/token" + # Deploy stack docker stack deploy -c docker/swarm/stacks/oncall/stack-oncall.yml oncall ``` diff --git a/docker/swarm/stacks/oncall/stack-oncall.yml b/docker/swarm/stacks/oncall/stack-oncall.yml index 611812e35..cf233740b 100644 --- a/docker/swarm/stacks/oncall/stack-oncall.yml +++ b/docker/swarm/stacks/oncall/stack-oncall.yml @@ -28,6 +28,9 @@ services: - "GANTRY_ROLLBACK_ON_FAILURE=true" - "GANTRY_UPDATE_TIMEOUT_SECONDS=300" - "GANTRY_UPDATE_OPTIONS=--with-registry-auth" + - "GANTRY_NOTIFICATION_APPRISE_URL=${GANTRY_GCHAT_WEBHOOK_URL}" + - "GANTRY_NOTIFICATION_CONDITION=on-change" + - "GANTRY_NOTIFICATION_TITLE=Gantry Auto-Update" volumes: - "/var/run/docker.sock:/var/run/docker.sock" - "/home/freecodecamp/.docker:/root/.docker"