This project includes project ktor-demo-app-base as a common base.
- Run
gradlew clean build
. - Run
docker build -t "ktor-demo-app-a:0.0.1-SNAPSHOT-ejcio" .
. - Run
docker run -d -p 8123:8123 -p 48123:48123 ktor-demo-app-a:0.0.1-SNAPSHOT-ejcio
. - Verify working via browser:
http://localhost:8123
and/orhttp://localhost:8123/json/gson
. - Tag the remote repository:
docker tag ktor-demo-app-a:0.0.1-SNAPSHOT-ejcio joramnv/ktor-demo-app-a:0.0.1-SNAPSHOT-ejcio
. - Push the image to the remote repository:
docker push joramnv/ktor-demo-app-a:0.0.1-SNAPSHOT-ejcio
<-- in this case it is my(!) public repo. (Use your own repo. You can also choose to make a private repo namespace first via the docker hub website.)
- JDK 11
- Dapr CLI (Install if you haven’t already: https://docs.dapr.io/getting-started/install-dapr-cli/ )
- Docker
Running the Dapr sidecar locally can be done through:
(Prerequisite is that you've run dapr init
on your machine.)
dapr run --components-path ./secrets --app-id app-a --app-port 48123 --app-protocol grpc --dapr-http-port 3500 --dapr-grpc-port 50001
- Note - In order for the secrets to load correctly, it is important to start the Dapr sidecar first.
- Note - I had some issues where locally Dapr could not find app-b from app-a and visa versa. I was connected to a VPN, when I turned off the VPN Dapr was functioning as normal again.
Running app-a locally can be done through: gradlew run