The service that is going to defeat the laziness.
Try it out on https://motivepick.com.
- Install PostgreSQL
- Create the database using
CREATE DATABASE motive ENCODING 'UTF8' TEMPLATE template0;
- Make sure that the database is running on
localhost
on5432
port, the username ispostgres
and the password ispostgres
. If that's not the case, see "How To Run With Non-Default Database". - In the project root run
./mvnw spring-boot:run -D spring.profiles.active=local
.
- Install Docker
- Run in project directory:
docker build -t db-image .
docker run -d --name db -p 5432:5432 db-image
- Verify container is running:
docker ps -a
- Update Spring Boot configuration:
spring.datasource.url=jdbc:postgresql://host.docker.internal:5432/motive
brew install postgresql
brew services start postgresql
createuser -s postgres
createdb motive --encoding='utf-8' --template='template0;'
./mvnw spring-boot:run -D spring.profiles.active=local
When deploy to LIVE make sure to replace application.yml
with one for LIVE.
Add the next parameters to your Spring Boot configuration:
spring.datasource.url
spring.datasource.username
spring.datasource.password
as on the following screenshot:
docker image build -t yaskovdev/motive-back-end .
docker image push yaskovdev/motive-back-end