Skip to content
Luka Murn edited this page Jun 2, 2018 · 3 revisions

How to deploy SciNote onto Heroku

Before deploying to Heroku, install heroku client as describe on offical website. To use existing heroku application, add new git remote repository.

git remote add heroku [email protected]:my-random-app-name.git

Or create new heroku application by executing following command.

heroku create

Add additional heroku buildpacks in the same order as specified in .buildpacks:

heroku buildpacks:add --index <i> <buildpack>

e.g. for adding graphviz write:

heroku buildpacks:add --index 2 https://github.com/weibeld/heroku-buildpack-graphviz.git

Before pushing to heroku master branch, some environmental variables should be set.

Heroku environmental variables

For deployment of SciNote onto Heroku, additional environmental variables need to be specified.

Variable Mandatory Description
LANG Yes The default localization language (e.g. en_US.UTF-8).
RAILS_ENV Yes Rails environment: production, test or development.
RACK_ENV Yes Rack environment: production, test or development.
RAILS_SERVE_STATIC_FILES Yes Whether to serve static files. Must be set to enabled.
WEB_CONCURRENCY Yes The concurrency of the server. See Heroku specifications for details.
MAX_THREADS Yes The max. number of threads. See Heroku specifications for details.
PORT Yes The port on which the application should run. See Heroku specifications for details.
RAILS_FORCE_SSL Yes If set to 1, enforce SSL communication on all levels of application.
DATABASE_URL Yes Full URL for connecting to PostgreSQL database.