A sample Ktor project showing how to run a Ktor application consisting of a web frontend and a database backend under Docker Compose.
This sample is a part of the codeSnippets Gradle project.
To run this application under Docker Compose, follow the steps below:
- Create a fat JAR containing a Ktor application:
./gradlew :twwdataapp:buildFatJar
- Run the
docker-compose up
command:Wait until Docker Compose pulls/builds the images and starts containers.docker compose --project-directory twwdataapp up