A Container should be run with:
docker run \
--rm \ #(1)
--network=runtime-network \ #(2)
--publish 8081:80 \ #(3)
--name ballchallenge \ #(4)
--env PUBLIC_IP=$(hostname -I) \ #(5)
--env BROKER_PORT=1883 \ #(5)
--env BROKER_IP=127.0.0.1 \ #(5)
--env CAMERA_PORT=8888 \ #(5)
--env CAMERA_IP=127.0.0.1 \ #(5)
ghcr.io/es-ude/elastic-ai.cloud.applications.ball_challenge:<tag>
-
Remove the container after shutdown
-
Required to communicate with the docker container running the MQTT broker
-
Port mapping for the webserver port, which allows the webinterface to be accessible from your browser (host:container)
-
Specify the name of the container
-
Set Variables for the app
💡
|
To ease your usage of the container it is recommended to provide an environment file instead of add each variable as a parameter. |
ℹ️
|
An example compose file is provided under compose.yml. |
For compiling the project, no additional tools are required.
We recommended pre-commit to check that the commit messages align with the conventional commit message standard.
Unit tests and integration tests can be executed independently.
Both use jacoco to finalize the tests with a report that shows the test results and the code coverage.
The reports can be found in the location build/reports/
relative to the corresponding build file.
Command | Task |
---|---|
|
Run all unit tests |
|
Run all Integration test |
This repository provides the BallChallenge application. A specific implementation for the Ball Challenge. To start the application locally via Gradle run:
PUBLIC_IP=$(hostname -I) \
CAMERA_IP=127.0.0.1 CAMERA_PORT=8888 \
./gradlew :app:bootRun
ℹ️
|
Environment Variables
|
❗
|
Profiles
For switching application profiles (lab, development, deploy) you can pass the selected one with SPRING_PROFILES_ACTIVE=<profile> ... ./gradlew ... |
A container image can be created with:
docker build -f Dockerfile -t ghcr.io/es-ude/ballchallgne:develop
This container can then be used in a docker-compose file or started manually as described in Run Container Image