config.yamland fill in the values there as we go through the later steps
- Register app at https://developer.todoist.com/appconsole.html and get the OAuth Client/Secret for
- OAuth Redirect URL there to "<host>/todoist/oauth" (http://localhost:5000/todoist/oauth for local setup)
- Register app at https://www.beeminder.com/apps/new and again get the OAuth values for
- Redirect URL should be "<host>/todoist/oauth" (http://localhost:5000/beeminder/oauth for local setup)
- Post deauthorisation URL isn't set
- If you've already got Bower installed, just run
bower install. Otherwise, install Node.js and run
npm install, which will install and run Bower.
pip install -r requirements.txt(preferably within a Virtualenv because that's just sensible)
You've now got a running version of the app at http://localhost:5000. Running
python docket.py will synchronise all registered users.
There's a running instance of this at https://docket-heroku.herokuapp.com/ but here's how I did that.
- Get a Heroku account. Free ones work fine.
- Install the Heroku toolbelt
- Goto your dashboard and make a new app. Mine was called "docket-heroku" but you'll need to use another name for yours, and replace anywhere I use that.
heroku git:remote --app docket-herokuto make it possible to push to deploy to your new app.
- We're using multiple buildpacks, both the Python (backend) and Node.js (assets). Just doing
heroku buildpacks:add --index 1 heroku/nodejsshould get you configured correctly, but for reference the result of
heroku buildpacksshould say (and if it doesn't, read the docs)
- Add the PostgreSQL addon
- Go into the settings for your app and set the following config variables:
- BEEMINDER_CLIENT_ID/BEEMINDER_CLIENT_SECRET - Beeminder app configured as per above, but with your Heroku URL, not localhost
- TODOIST_CLIENT_ID/TODOIST_CLIENT_SECRET - Ditto, but for Todoist
- FLASK_ENCRYPTION_KEY - Something secret for Flask to use for cookie encryption
git push heroku master
- At this point, goto your Heroku URL and check everything works. You might have an error page the first time you load it due to clashes between multiple workers all trying to configure the DB. Just refresh and it should fix itself.
- Add the Scheduler addon and configure the update command (
python docket.py) to run every so often.