Skip to content

Latest commit

 

History

History
54 lines (48 loc) · 1.3 KB

README.md

File metadata and controls

54 lines (48 loc) · 1.3 KB

ORService

Spring Boot REST Service to provide a REST API replacement to current Sarapis OR Service.

To run the database

Copy the environment variables from the .env file.

cp .env.example .env

Start the db container with the following command

docker-compose up

In your terminal you will find the logs of the database. If you see the following log the database has started gracefully.

LOG:  database system is ready to accept connections

To shut down the container database use

docker-compose down

To run the service

Build the Java service. This command will generate the application jar inside the target directory.

mvn clean install

If the build is successful, then run the service

java -jar target/orservice-0.0.1-SNAPSHOT.jar

You will start seeing logs from the service booting up. If you see the following log

Started OrserviceApplication in {} seconds (process running for {})

the service has started successfully.

Troubleshooting

If the db has not started successfully do the following:

  1. Check that the container is running
docker ps

You should see all the containers running in your machine.

  1. Try rebuilding the database
docker-compose down --volumes
rm -rf postgres_data
docker-compose up --build