Position yourself in the root of the project (directory where you found this file) and run the following commands:
mvn clean packageIf you wish to build a Docker image out of the project, either use Docker CLI or run maven with docker profile.
# Build image
mvn -P docker package
# Push to AWS Docker repo
mvn -P docker installPlease note that, in order for the push to AWS ECR to work, you need to follow these steps:
- Login to AWS console
- Generate credentials for AWS CLI
- Put credentials into
~/.aws/credentials - Run:
aws ecr get-login --no-include-email --region eu-west-1 - Locate "username" and "password"
- Put username and password into
~/.mv/settings.xmlunder section "servers"
<servers>
<server>
<id>745008152238.dkr.ecr.eu-west-1.amazonaws.com</id>
<username>AWS</username>
<password>...a.huge.pile.of.chars...</password>
</server>
</servers>Application consists of two components: the reference implementation and the optional Skeleton Judge Thread. Skeleton Judge Thread hosts the callback for invoice generation report. If you have anything else that can simulate it, as defined by OpenAPI YMLs, feel free to do so.
To run the application, position in "backend" forlder and from there run Spring Boot application. You must provide the database profile to be used, one of:
- db-h2
- db-postgres
You may also need to adjust JDBC URL to map to the correct DB. For instance:
cd backend
java -jar target/backend-0.0.1-SNAPSHOT.jar \
--spring.profiles.active=db-postgres \
--spring.datasource.url=jdbc:postgresql://pgsql/hack9dbFrom the root of the project position into the backend folder of the skeleton Judge Thread and run it.
cd control/backend
java -jar target/control-backend-0.0.1-SNAPSHOT.jarAll images have an entrypoint defined as java -jar <path to Spring Boot JAR>
you can add in the command all additional parameters for the application. You
must define the active profile, since there is no default.
If you have built your Docker images, you can run them using Docker Compose. Position yourself in the root of the repository (parent project) and run:
docker-compose upApplication is accessable on the base URL http://localhost:8080/reference/
For example on how to access it, see Postman JSON in backend/src/test/scripts.
Just press Ctrl+C (in both windows where you started reference and judge thread).
Or, if you were using Docker Compose, just press Ctrl+C in the main window or use
docker-compose stop from another terminal.