ubie-oss / fastly-purge-bot

A slackbot to purge Fastly cache

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fastly-purge-bot

A slackbot to purge Fastly cache.

Configuration

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

Setup

  1. Deploy the docker image somewhere and expose to the Internet.
  2. Create a Slack App. The example manifest is here (Rewrite [HOST] with your hosting URL).
  3. Invite the bot to the Slack channel (NOTIFY_CHANNEL_ID).

Usage

Say /fastly-purge.

Demo

demo.mov

About

A slackbot to purge Fastly cache

License:MIT License


Languages

Language:TypeScript 97.9%Language:Dockerfile 2.1%