Deployment Notifications
Send deployment notifications from Docker Compose, Kubernetes, Vercel, Netlify, and Railway when deploys start, succeed, or fail, routed to the right team.
Deployments affect everyone. Whether it's a new feature going live or a hotfix rolling out, the right people need to know - in real time, not via a status page they might not check.
Docker / Docker Compose
Wrap your deploy script with notifications:
#!/bin/bash
WEBHOOK="https://app.alphorn.dev/n/V1StGXR8_Z5jdHi6B-myT"
ALPHORN_API_KEY="${ALPHORN_API_KEY:-alp_...}" # or export it in the environment
SERVICE="my-app"
VERSION=$(git describe --tags --always)
# Notify start
curl -fsS -X POST "$WEBHOOK" \
-H "Authorization: Bearer $ALPHORN_API_KEY" \
-H "Content-Type: application/json" \
-d "{
\"title\": \"Deploy started: $SERVICE\",
\"message\": \"Deploying $VERSION to production\",
\"priority\": 2,
\"tags\": [\"deploy\", \"started\", \"$SERVICE\"]
}"
# Deploy
docker compose pull && docker compose up -d
EXIT_CODE=$?
if [ $EXIT_CODE -eq 0 ]; then
curl -fsS -X POST "$WEBHOOK" \
-H "Authorization: Bearer $ALPHORN_API_KEY" \
-H "Content-Type: application/json" \
-d "{
\"title\": \"Deploy succeeded: $SERVICE\",
\"message\": \"$VERSION is live in production\",
\"priority\": 2,
\"tags\": [\"deploy\", \"success\", \"$SERVICE\"]
}"
else
curl -fsS -X POST "$WEBHOOK" \
-H "Authorization: Bearer $ALPHORN_API_KEY" \
-H "Content-Type: application/json" \
-d "{
\"title\": \"Deploy FAILED: $SERVICE\",
\"message\": \"$VERSION failed to deploy (exit $EXIT_CODE)\",
\"priority\": 5,
\"tags\": [\"deploy\", \"failure\", \"$SERVICE\"]
}"
fiKubernetes
Send a notification from a Kubernetes Job or post-deploy hook:
apiVersion: batch/v1
kind: Job
metadata:
name: deploy-notify
spec:
template:
spec:
containers:
- name: notify
image: curlimages/curl
command:
- curl
- -fsS
- -X
- POST
- $(ALPHORN_WEBHOOK)
- -H
- "Authorization: Bearer $(ALPHORN_API_KEY)"
- -H
- "Content-Type: application/json"
- -d
- '{"title":"Deployed to k8s","message":"$(APP_VERSION) rolled out","priority":2,"tags":["deploy","k8s"]}'
env:
- name: ALPHORN_WEBHOOK
valueFrom:
secretKeyRef:
name: alphorn
key: webhook-url
- name: ALPHORN_API_KEY
valueFrom:
secretKeyRef:
name: alphorn
key: api-key
- name: APP_VERSION
value: "v1.2.3"
restartPolicy: NeverVercel
Use deploy webhooks: Vercel can call a URL on deploy events - point it at your Alphorn webhook endpoint.
- Go to Team Settings → Webhooks and add a webhook for deployment events (webhook availability depends on your Vercel plan, so check yours). Deploy Hooks under Project Settings → Git are the opposite direction: incoming URLs that trigger a deploy.
- Or use the Vercel API in a GitHub Action to POST to Alphorn after deploy completes
Platform deploy webhooks can't send an Authorization header, so create that webhook with the API key switched off (No API key (URL is the secret)) and keep the URL private. A GitHub Action step can send the header like the CI/CD examples.
Auto-detect recognizes Vercel webhooks (via the x-vercel-signature header) and formats deployment events such as started, succeeded, failed, and canceled. Failed deployments get priority 4. See Supported Sources.
Netlify
- In Alphorn, create a webhook with the API key switched off (No API key (URL is the secret)). Netlify can't send a custom
Authorizationheader, so keep the URL private. - In Netlify, open your site and go to Site configuration → Notifications → Deploy notifications
- Click Add notification → HTTP POST request
- Pick the event (for example Deploy failed or Deploy succeeded) and paste your Alphorn webhook URL
- Repeat for each event you want
Auto-detect recognizes Netlify deploy notifications and formats the deploy state, site, and branch. Failed deploys get priority 4. See Supported Sources.
Railway
- In Alphorn, create a webhook. Railway can send custom headers, so you can keep Require API key on.
- In your Railway project, open Settings → Webhooks, paste your Alphorn webhook URL, and add the custom header
Authorization: Bearer <api-key>. - Click Save Webhook. One webhook covers all environments of the project.
Railway webhooks are unsigned and have no vendor header: Auto-detect recognizes them by payload shape (a type like Deployment.failed plus resource.project). Failed and crashed deployments get priority 4, alerts take Railway's severity (CRITICAL 5, ERROR 4, WARNING 3). See Supported Sources.
Routing examples
The tags below are from the custom curl examples on this page. Auto-detected Vercel, Netlify, and Railway notifications use their own tags (see Supported Sources), for example vercel, netlify, and railway.
| Channel | Filter | Purpose |
|---|---|---|
| Slack (#deployments) | Tags has any of deploy | All deploy activity |
| Slack (#engineering) | Tags has any of failure | Only failed deploys |
| PagerDuty | Priority greater than 3 and tags has any of deploy | Page on-call for deploy failures |
| Discord | Tags has any of success | Celebrate successful releases |
Server & Infrastructure Monitoring
Server monitoring alerts with a shell script and cron: disk space, memory usage, CPU load, and SSL certificate expiry, routed to Slack, email, or SMS.
Application Error Tracking
Route application errors and exceptions to the right team in real time, with examples for Express.js, Python, and frontend JavaScript errors.