Deploy with Heroku
Please note: you will need to have an account at Heroku for this to work. Hosting at Heroku is more expensive than hosting it with Docker on a VPS. We will set it up to use two Hobby Dynos (which will be $14/month). A database upgrade might be necessary later on.
You will have to login to Heroku or create an account there. Then, you will need to click this link to start the process: https://heroku.com/deploy?template=https://github.com/chiefonboarding/ChiefOnboarding. Heroku will then ask you for some details. Please be careful to put them in correctly, otherwise your app will not start.
The app name can be anything you want (so long it is available).
Under "config vars" you will have 5 items. Before you fill in anything: decide whether you want to use a Heroku subdomain <app name>.herokuapp.com
or your own domain onboarding.yourcompany.com
. Your own domain doesn't have to be a subdomain.
SECRET_KEY
You can't change this and shouldn't. It will be generated by Heroku. It's used for signing cookies, encrypting data etc.
SSL_REDIRECT
Leave it at True
. This is used to redirect all traffic from http
to https
.
ALLOWED_HOSTS
This needs to be the domain you want to use for the platform. Either your Heroku subdomain or your own subdomain. You can add multiple urls if you want to make it available with multiple urls (example: domain.example.com,domain2.example.com
). Do not add the protocol (https://
) before the url.
Click on Deploy app
. You should see this when it's done (this might take a few minutes):
If you are using a custom domain: go to the settings area and look for the 'domains' part:
Then click on 'Add domain' and enter your domain name. You will get a DNS target to point your domain name to in your DNS settings:
You might get a red icon now next to your domain name. It might take a bit of time to get your domain validated (DNS is often cached). Just wait for a bit and try to refresh it until it becomes green:
That's all!
Update Heroku
Please make a backup of your database before doing this.
- Install the Heroku CLI and authenticate yourself.
- Download the ChiefOnboarding git repo:
git clone https://github.com/chiefonboarding/ChiefOnboarding.git
- Add your heroku git url as a git remote. You can find this url on the app's settings page -> app info -> Heroku git URL.
git remote add heroku_repo repo_url
(replacerepo_url
with your own url). - Then push it up:
git push heroku_repo master