dawids21 / CoBudget

Control your budget
https://cobudget.stasiak.xyz
MIT License
0 stars 0 forks source link

Create test application to check Heroku #13

Closed dawids21 closed 3 years ago

dawids21 commented 3 years ago

Running Spring Boot Application on Heroku

dawids21 commented 3 years ago

Links

Test app

heroku-mongodb-test-app

Heroku

Deploying an app to Heroku

  1. Create a Git repository inside the app
  2. Add Heroku remote
  3. Specify Java version inside system.properties file (java.runtime.version=15) - default 1.8
  4. Push your deployment branch to the Heroku remote.
  5. To view logs use heroku logs --tail

Procfile

Running the app locally

It allows us to check our deployment's config in the local environment. Use heroku local web. The app will be available on port 5000.

Config vars

Store sensitive data. At runtime, they are exposed using environmental variables. To add use heroku config:set VAR='value'. To view config vars use heroku config. To use local config vars you can add them to the .env file as KEY=VALUE pairs.

One-off dyno

Used to run command in the terminal on the app instance. To use run heroku run java -version