Spring Boot Heroku Demo

by britter

GitHub Readme.md

spring-boot-heroku-demo

Build Status Coverage Status License

This is a small demo application for showing how to run a Spring Boot application on Heroku. For more information have a look at the accompanying blog post. You can test the application here. Note that it is only running on a free dyno, so it may take some time before it responds.

Deploy to Heroku

Running the application

To run the application from your IDE, simply run the com.github.britter.springbootherokudemo.Application class as a Java Application. Alternatively the application can be started from the terminal using gradle with ./gradlew bootRun. After starting the application, point your browser to http://localhost:8080.

Using a Postgres database for persistence

For running the application using a real Postgres database, the postgres application profile defined by the application-postgres.properties file can be used. You can either change the file to point to your pre existing Postgres instance or use a Docker Postgres container. To start Postgres in Docker just run ./gradlew dockerRun and it will create a Postgres container for you. After that you can start the application with postgres profile by running ./gradlew bootRun -Ppostgres

License

Code is under the Apache Licence v2.