Skip to content

Commit ceccb0a

Browse files
committed
docs: update oncall stack
1 parent bd71101 commit ceccb0a

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

docker/swarm/stacks/oncall/README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,19 +115,25 @@ Trigger an on-demand Gantry update from a GitHub Actions workflow:
115115
116116
## Testing Webhook
117117
118-
Manual curl examples for verifying the webhook service:
118+
Run from the manager node (`ssh freecodecamp@ops-vm-backoffice`):
119119

120120
```bash
121-
# Valid request (with secret header)
121+
# Trigger update for a specific service
122122
curl -X POST http://localhost:9889/hooks/run-gantry \
123123
-H "Content-Type: application/json" \
124-
-H "X-Webhook-Secret: YOUR_SECRET_HERE" \
125-
-d '{"GANTRY_SERVICES_FILTERS":"name=mystack_myservice"}'
124+
-H "X-Webhook-Secret: $WEBHOOK_SECRET" \
125+
-d '{"GANTRY_SERVICES_FILTERS":"name=<stack>_<service>"}'
126126
127-
# Invalid request (without secret — should be rejected)
127+
# Trigger update for all autoupdate-labeled services (no filter)
128128
curl -X POST http://localhost:9889/hooks/run-gantry \
129129
-H "Content-Type: application/json" \
130-
-d '{"GANTRY_SERVICES_FILTERS":"name=mystack_myservice"}'
130+
-H "X-Webhook-Secret: $WEBHOOK_SECRET" \
131+
-d '{}'
132+
133+
# Invalid request (no secret — should return "Hook rules were not satisfied")
134+
curl -X POST http://localhost:9889/hooks/run-gantry \
135+
-H "Content-Type: application/json" \
136+
-d '{}'
131137
132138
# Check webhook logs
133139
docker service logs oncall_svc-webhook

0 commit comments

Comments
 (0)