Releasing the site on production
Last updated
Was this helpful?
Last updated
Was this helpful?
To install Boorunaut on a Heroku server, you will need to make some changes on the default settings to make it work with PostgreSQL.
First, create a project for your site:
Once it's done, you need to add Heroku-related files. Create a requirements.txt
file on the root of the project with:
Create a Procfile
for Heroku:
You will need to make some adjustments to the default settings.py generated to use in production. These involve configurating a new database and transforming sensitive data into environment variables (an security measure).
Then, add to the end of your settings.py
:
Firstly, you will need to turn your SECRET_KEY into an enviroment variable.
Then you can change the default SQLite database with a backend better suited for production.
For PostgreSQL (better compatibility with Heroku), replace the DATABASES
variable content with:
Add your website on ALLOWED_HOSTS
:
Once the configuration is done, you can initialize git on your project (if haven't already), commit the changes and be ready to push it to Heroku.
Remember to set DEBUG
to False
on settings.py
before sending to production!
Heroku has an library for automating the configuration of Django apps with Heroku sites, . You need to add to your requirements.txt
: