Kotlin microservice template produces self-executable jar application. For brevity, double-space
formatting is used. Ktor
is included to mock Digital Ocean healthy checks.
- Make sure you are signed in to your GitHub account, then just
click
here
to use template. App.kt
file is entry point.
Execute ./gradlew clean build
. Your jar will be located at ./build/libs
with -all.jar
postfix.
Now you can run:
java -jar service-all.jar
Execute docker build . -t service
. Your image will be located at docker images -a
. Now you can
run:
docker run -v `pwd`:`pwd` -w `pwd` -it --rm -p 80:80 service
You can edit deploy configuration at file deploy.template.yaml.