Skip to content

Commit

Permalink
Document additional env variables in DEPLOY.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rebkwok committed Jul 4, 2023
1 parent 5ee4a09 commit 7bc9237
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions DEPLOY.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,28 @@ If you update any scopes after installing the app, you'll need to reinstall it (
usually prompt for this).

### Set environment variables

Copy `dotenv-sample` to `.env` and update with relevant environment variables. See also
comments in `ebmbot/settings.py`.

The following slack environment variables need to be set:
- `SLACK_LOGS_CHANNEL`: channel where scheduled job notifications will be posted
- `SLACK_TECH_SUPPORT_CHANNEL`: channel where tech-support requests will be reposted
- `SLACK_APP_TOKEN`: app-level token generated above (starts `xapp-`); found on the app's Basic Information page
- `SLACK_BOT_TOKEN`: bot token generated above (starts `xoxb-`); found on the app's Oauth and Permissions page
- `SLACK_SIGNING_SECRET`: Found on the app's Basic Information page, under App Credentials
- `SLACK_APP_USERNAME`: The app's default name (and the name users will refer to the Bot as in Slack); found under Features > App Home

The following webhook environment variables need to be set. These relate to callbacks from
OpenPrescribing, and are configured at https://github.com/ebmdatalab/openprescribing/settings/hooks/85994427.
- `GITHUB_WEBHOOK_SECRET`
- `WEBHOOK_ORIGIN`
- `EBMBOT_WEBHOOK_SECRET`

The following environment variable allows the bot to authenticate with Github to retrieve
project information.
- `DATA_TEAM_GITHUB_API_TOKEN`: Note that this must be a classic PAT (not fine-grained) and
needs the `repo` and `read:project` scope

GCP service account credentials:
- `GCP_CREDENTIALS_PATH`
2 changes: 1 addition & 1 deletion dotenv-sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# See comments in embbot/settings.py
# See comments in ebmbot/settings.py
EBMBOT_PATH=$PATH:/var/www/ebmbot/venv/bin/
LOGS_DIR=changeme
SLACK_LOGS_CHANNEL=changeme
Expand Down

0 comments on commit 7bc9237

Please sign in to comment.