Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

From docker-compose folder run the following after building the images locally

Code Block
languagebash
VERSION=latest DB_USERNAME=cps DB_PASSWORD=cps docker-compose up -d

This starts both cps and postgres containers.

Note: Checkout the README.md in docker-compose folder for detailed steps.

Setup schema in DB

Liquibase auto creates the schema on startup.

Set environment variables with relevant connection details which can be found in application.yml in cps-application/resources folder.

Running the project

This option is if you have  a local PostgreSQL running.

From the cps folder run the following command :

Code Block
java -DDB_HOST=localhost -DDB_USERNAME=cps -DDB_PASSWORD=cps -jar cps-application/target/cps-application-x.y.z-SNAPSHOT.jar

NB. On Linux use IP address of a container instead of localhost

OR 

From the cps\cps-application folder run the following command:

Code Block
mvn spring-boot:run