To deploy Saleor to Heroku create a new Heroku app and configure your Saleor's git repository together with Heroku app using:
ALLOWED_HOSTS are required to properly setup CORS headers. SECRET_KEY is used by Django to store your secret data, it should have a cryptographically strong amount of entropy in case of production deployments.
In the next step, deploy using
Heroku will build and deploy Saleor automatically.
Heroku’s storage is volatile. This means that all instances of your application have separate disks and lose all changes made to the local disk each time the application is restarted. The best approach is to use cloud storage such as Amazon S3. See Storing Files on Amazon S3 for configuration details.
Populating the database with example data
Before logging in to Saleor Dashboard, you need to create a staff / superuser account. To do that, please run the following command:
Also, if you want to populate the database with sample data, run the following command:
heroku run -a '<saleor-app name>' python manage.py populatedb --createsuperuser will fill the database with sample data. It is NOT supposed to be executed in a production environment!
Both commands create an admin account with the email:
firstname.lastname@example.org and password:
Storefront and Dashboard Deployment
Deployment of both Saleor Storefront and Dashboard require exactly the same steps. First, create new Heroku apps for both services. Then configure both of them and your Storefront and Dashboard git repository using:
The next step is just to deploy using
How to log in to Saleor Dashboard
Once the Saleor Dashbord app has been created on Heroku, you can log in via the URL
<dashboard-app name>.herokuapp.com using the admin account.
Updating currency exchange rates
You should run this command periodically. The best way to ensure this is done is by using Heroku’s Scheduler service.
To add it to our application:
Then log into your Heroku account, find the Heroku Scheduler add-on in the active add-on list, and have it run the following command on a daily basis: