Deploying to Heroku

This sub-generator allows the deployment of your JHipster .Net application to Heroku cloud.

The Heroku sub-generator will always use free tiers/options. Nevertheless installing addons needs a properly verified Heroku account.

Therefore to avoid any unexpected build failures, we would recommend verifying your Heroku account before starting this sub-generator.

Pre-requisites

Before running the sub-generator, you must install the Heroku CLI.

Make sure that you are logged into Heroku.

heroku login

Git is also required to deploy to Heroku.

Also make sure you have a working Docker installation (eg. docker ps) if deploying to Heroku Container Registry.

Deploying to Heroku

To deploy your application to Heroku, run the following command:

jhipster heroku

Databases

  • Mysql ✔
  • Postgres ✔
  • MSSQL ✔ (requires a manual step described below)

Currently MySql and PostgreSQL database addons are free and automatically added by this sub-generator when deploying to Heroku. Even though those resouces are free, an accound with verified credit card is required to add them.

Heroku’s MSSQL addon is not free of cost and to avoid unexpected costs It will not be provisioned automatically when deploying to Heroku.

Please visit the MSSQL addon page, review the pricing and add the MSSQL addon to your account with the following command:

heroku addons:create mssql:REPLACE_PLAN_NAME --as DATABASE --app REPLACE_YOUR_APP_NAME

Oauth2

For applications that use Oauth2 the following manual steps are required:

1. Deploy the application to Heroku using `jhipster heroku`.
2. Access your (Heroku Dashboard)[https://dashboard.heroku.com/] and select the app you have just created.
3. Under `Installed add-ons` okta should be already installed.
4. Click on `okta` to open the addon's Dashboard.
5. To configure it follow the documentation (here)[https://jhipsternet.readthedocs.io/en/latest/Features/security.html#okta]

Limitations

Only monolithic deploys are supported at the moment.