Skip to content

simple-time-tracker/time-tracker-api

Repository files navigation

time-tracker-api

Build Status codecov Known Vulnerabilities

Description

Simple time tracking application. Not ready for production

Build api

./gradlew build

Running app locally

Start DB and Keycloak containers

Launch Keycloak auth server and PostgreSql DB

cd dev-env
docker-compose up -d

Start application

There are few different ways to start application

Start JAR from shell

Launch procedure is same as for other jars

java -Dspring.profiles.active=dev -jar time-tracker-api-0.0.1-SNAPSHOT.jar

From Intellij

Add VM argument -Dspring.profiles.active=dev for TimeTrackerApplication class

Docker

Launch API container:

docker run -it -e ACTIVE_PROFILES=dev -p 8180:8080 --name time-tracker-api dovydasvenckus/time-tracker

Production profile (with real DB)

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

Launching API + Frontend app

You can use docker-compose to launch whole stack. Docker compose file is located in time-tracker-env repository.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published