A slackbot to purge Fastly cache.
Environment variable name | Required | Description |
---|---|---|
SLACK_BOT_TOKEN | Yes | |
SLACK_SIGNING_SECRET | Yes | |
FASTLY_API_TOKEN | Yes | Scopes: [global:read, purge_all, purge_select] |
NOTIFY_CHANNEL_ID | Yes | Slack channel ID used to notify result |
PORT | No | Listen port (default :3000) |
ACCESSIBLE_GROUP_IDS | No | Slack group IDs (Comma-separated) that can invoke command |
- Deploy the docker image somewhere and expose to the Internet.
- Create a Slack App. The example manifest is here (Rewrite
[HOST]
with your hosting URL). - Invite the bot to the Slack channel (NOTIFY_CHANNEL_ID).
Say /fastly-purge
.