Simple time tracking application. Not ready for production
./gradlew build
Launch Keycloak auth server and PostgreSql DB
cd dev-env
docker-compose up -d
There are few different ways to start application
Launch procedure is same as for other jars
java -Dspring.profiles.active=dev -jar time-tracker-api-0.0.1-SNAPSHOT.jar
Add VM argument -Dspring.profiles.active=dev
for TimeTrackerApplication class
Launch API container:
docker run -it -e ACTIVE_PROFILES=dev -p 8180:8080 --name time-tracker-api dovydasvenckus/time-tracker
docker run -it --rm \
-p 8180:8080
-e ACTIVE_PROFILES=prod \
-e DB_URL="jdbc:postgresql://jdbcUrlToPosgreSQLDB" \
-e DB_USERNAME="myDBUserName" \
-e DB_PASSWORD="mySecretPassword" \
-e DB_DIALECT="org.hibernate.dialect.PostgreSQLDialect" \
-e CORS_ALLOW='' \
dovydasvenckus/time-tracker-api
You can use docker-compose to launch whole stack. Docker compose file is located in time-tracker-env repository.