Skip to content

navikt/syfooversiktsrv

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date
Nov 18, 2024
Feb 11, 2025
Aug 22, 2024
Mar 19, 2025
Apr 26, 2023
Jun 4, 2019
Jun 4, 2019
Aug 22, 2024
Jun 4, 2019
Sep 16, 2024
Jan 29, 2025
May 10, 2022
Jul 5, 2019
Sep 16, 2024
Aug 22, 2024
Aug 22, 2024
Sep 7, 2020

Repository files navigation

syfooversiktsrv

This application is a service dedicated to supply Syfooversikt(https://github.com/navikt/syfooversikt) with a list of relevant persons and information on them.

Technologies used

  • Kotlin
  • Ktor
  • Gradle
  • Spek
  • Postgres

Buil and run local

  • First start the database:
$ docker-compose up
  • Run the main() function in SyfooversiktApplication.kt

Connect to the db from terminal:

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;

Build

Run ./gradlew clean shadowJar

Lint (Ktlint)

Command line

Run checking: ./gradlew --continue ktlintCheck

Run formatting: ./gradlew ktlintFormat

Git Hooks

Apply checking: ./gradlew addKtlintCheckGitPreCommitHook

Apply formatting: ./gradlew addKtlintFormatGitPreCommitHook

Creating a docker image

Creating a docker image should be as simple as docker build -t syfooversiktsrv .

Running a docker image

docker run --rm -it -p 8080:8080 syfooversiktsrv

Starting a local PostgreSQL server

Run docker-compose up.