This application is a service dedicated to supply Syfooversikt(https://github.com/navikt/syfooversikt) with a list of relevant persons and information on them.
- Kotlin
- Ktor
- Gradle
- Spek
- Postgres
- First start the database:
$ docker-compose up
- Run the
main()
function inSyfooversiktApplication.kt
To connect and run queries directly against the db run:
$ docker-compose exec -it db bash
//in the docker bash run the following
$ psql -U username syfooversiktsrv_dev
Some sample commands/queries:
// list tables
$ \dt
// sample query
$ select * from person_oversikt_status;
Run ./gradlew clean shadowJar
Run checking: ./gradlew --continue ktlintCheck
Run formatting: ./gradlew ktlintFormat
Apply checking: ./gradlew addKtlintCheckGitPreCommitHook
Apply formatting: ./gradlew addKtlintFormatGitPreCommitHook
Creating a docker image should be as simple as docker build -t syfooversiktsrv .
docker run --rm -it -p 8080:8080 syfooversiktsrv
Run docker-compose up
.