You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
psql - idono, search your package manager (should come with postgres)
git clone git@github.com:ncss/ncss-coffeerun.git
python -m venv .venv
source .venv/bin/activate (Every time you want to run/use this code)
pip install -r requirements/prod.txt (You need postgres, and you might have to mess with versions because of changes in Python - remove the version requirement and see what happens!)
export DATABASE_URL=$(heroku config:get DATABASE_URL -a <heroku-app-name>
(In virtualenv) python create_db.py
More auth and database things
Go to https://.herokuapp.com/ and login with Slack
Go to https://.herokuapp.com/team-auth/ and add it to the right workspace and channel
"Access token stored in db" is Good!
Get the bot user details
Slack user id (This is probably terrible and totally wrong): New direct message to the bot user, pick out the part after /team/ in the URL you get when you hover over the @name.
Bot OAuth access token: In Slack app settings, OAuth & Permissions, copy the Bot token
Hack the database
psql psql $(heroku config:get DATABASE_URL -a <heroku-app-name>
update slack_team_access_token set coffee_bot_slack_user_id = '<user_id>', coffee_bot_slack_access_token = '<bot_token>', wants_slack_notifications=true;
Last steps
On Heroku, go to the Resources tab
Enable the worker python coffeebot.py
Add the bot user to the right channel somehow (I like to @ it)