Skip to content

ohadnav/amazon-image-checker

Repository files navigation

How to test locally

  1. Download Postgres App and run it using the default settings
  2. Install requirements.txt and test_requirements.txt using pip
  3. Set the following local environment variables:
  4. img.png
  5. DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres
  6. How to find SLACK_WEBHOOK_URL
  7. 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
  8. Go to this URL and then generate new token and store it in AIRTABLE_API_KEY
  9. How to get LWA_* and SP_API_* from merchants table from Heroku's postrgres (use the same credentials as in production)

How to deploy to production

  1. Connect the GitHub repository to Heroku (article)
  2. By default, everytime you push new code to master the project rebuilds itself (it'll also happen by default if you create a new Heroku app)
  3. By default, scheduler/clock.py runs periodically
  4. Heroku needs the following addons Heroku Postgres and Heroku Scheduler, and Papertrail is also recommended
  5. How to set environment variables for production:
  6. Environment variables are the same as local variables with the following exceptions:
  7. The environment variables LWA_* and SP_API_* do not end with _TEST
  8. 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
  9. Note that DATABASE_URL should be set automatically by Heroku Postgres
  10. If that's the first run (i.e. the app was previously successfully run)

How to define the AWS - SP API and LWA variables

  1. How to define AWS for SP API
  2. How to define LWA from Seller Central
  3. How to rotate LWA secret - NEEDS TO BE DONE EVERY 90 DAYS

How to use the tool

  1. How to create new AB test
  2. How to stop active AB test change the status in Airtable to inactive

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages