Skip to content

xebia-functional/gh-alerts-subscriptions-kotlin

Repository files navigation

github-alerts-kotlin

This repository contains an example implementation of the subscription microservice (Ktor flavour) described in 'GitHub Notification Service for Slack '. Please see that document for the specification and requirements.

📘 Quick Start

Local Development

To run the project locally the easiest is to:

  1. Run Postgres and Kafka through docker-compose
  2. Start the application through Gradle
docker compose -f docker-compose.yml -f docker-compose.local.yml up -d
./gradlew run

NOTE: Gradle does not respect propagating SIGTERM to the running application, so graceful shutdown is not respecting when running this way.

Running the application in Docker

Publish the docker image locally

./gradlew publishImageToLocalRegistry

Start up services (Postgres, Kafka, Schema Registry, etc.) with the app

docker compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose-app.yml up -d

You can check the readiness or health of the service with

curl --request GET 'http://localhost:8080/readiness'
curl --request GET 'http://localhost:8080/health'
pong

When you're done, stop the services.

docker-compose down --remove-orphans

About

Kotlin Training Track - Subscription Service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages