This starter is a set of utilities built on top of Ktor to quickly bootstrap a microservice. This starter sets up the following features:
Service
foo/
and foo
are treated the same)Infrastructure
I typically manage installations using asdf, but to each their own. If you do use,
asdf, there is a .tool-versions
file in the root of the project that you can use for installation.
Let's first clone the repo and fire up our system,
git clone git@github.com:aedenj/ktor-starter.git ~/projects/ktor-starter
cd ~/projects/ktor-starter;docker compose up
This will start the app on port 8080. Navigate to http://localhost:8080 to see the app running.
When running the service via docker compose Ktor's auto-reload
functionality is enabled. This means that if you open a separate terminal and run the command ./gradlew -t build -x test -i
when you make changes to the code, the service will automatically reload.
Got output:
credentials not found in native keychain
The credential helper (docker-credential-desktop) has nothing for server URL: registry-1.docker.io
Make sure the task is actually failing. Jib tries serveral hosts and you may have credentials setup for one of them. If the task is failing, you can fix this by running the following commands,
Run docker login registry-1.docker.io
and enter your Docker Hub credentials.
Re-run the JIB task.