- Download Postgres App and run it using the default settings
- Install
requirements.txtandtest_requirements.txtusing pip - Set the following local environment variables:

DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres- How to find
SLACK_WEBHOOK_URL - Go to this URL and
then follow these steps to find
AIRTABLE_BASE_ID,AIRTABLE_TABLE,AIRTABLE_VIEW- make sure to use AB test data ** dev** table - Go to this URL and
then generate new token and store it
in
AIRTABLE_API_KEY - How to get
LWA_*andSP_API_*frommerchantstable from Heroku's postrgres (use the same credentials as in production)
- Connect the GitHub repository to Heroku (article)
- By default, everytime you push new code to
masterthe project rebuilds itself (it'll also happen by default if you create a new Heroku app) - By default,
scheduler/clock.pyruns periodically - Heroku needs the following addons Heroku Postgres and Heroku Scheduler, and Papertrail is also recommended
- How to set environment variables for production:
- Environment variables are the same as local variables with the following exceptions:
- The environment variables
LWA_*andSP_API_*do not end with_TEST - Go to this URL and
then follow these steps to find
AIRTABLE_BASE_ID,AIRTABLE_TABLE,AIRTABLE_VIEW- make sure to use AB test data ** prod** table - Note that
DATABASE_URLshould be set automatically by Heroku Postgres - If that's the first run (i.e. the app was previously successfully run)
- that's the SQL query to create the tables at Postgres, can also be found sql/create_tables.sql
- How to define AWS for SP API
- How to define LWA from Seller Central
- How to rotate LWA secret - NEEDS TO BE DONE EVERY 90 DAYS
- How to create new AB test
- How to stop active AB test change the status in Airtable to inactive