Base application made with spring boot and postgres to serve as example.
Download the application using git:
$ git clone https://github.com/DanielMachadoVasconcelos/base-application.git
$ cd /base-application
Build the application using maven
$ mvn clean install
Start the database, and the application, using Docker Compose:
$ docker-compose up
Any files in the initdb
directory will be used to initialize the database
when the Postgres container is first started. The sample init.sql
file
shows how to create a database called sampledb
.
The compose file will run the spring boot application. It will listen on your local system's port 8888.
Execute the command bellow to fetch the application endpoint:
$ curl --location --request GET 'http://localhost:8888/summary'