diff --git a/core/src/main/kotlin/org/dreamexposure/discal/core/health/DisCalDbReactiveHealthIndicator.kt b/core/src/main/kotlin/org/dreamexposure/discal/core/health/DisCalDbReactiveHealthIndicator.kt deleted file mode 100644 index 6c3f6f12..00000000 --- a/core/src/main/kotlin/org/dreamexposure/discal/core/health/DisCalDbReactiveHealthIndicator.kt +++ /dev/null @@ -1,27 +0,0 @@ -package org.dreamexposure.discal.core.health - -import kotlinx.coroutines.reactor.awaitSingle -import kotlinx.coroutines.reactor.mono -import org.dreamexposure.discal.core.database.CalendarRepository -import org.dreamexposure.discal.core.logger.LOGGER -import org.springframework.boot.actuate.health.Health -import org.springframework.boot.actuate.health.ReactiveHealthIndicator -import org.springframework.stereotype.Component -import reactor.core.publisher.Mono - -@Component -class DisCalDbReactiveHealthIndicator( - private val calendarRepository: CalendarRepository, -): ReactiveHealthIndicator { - override fun health(): Mono = mono { - return@mono try { - calendarRepository.healthCheck().awaitSingle() - - Health.up().build() - } catch (ex: Exception) { - LOGGER.error("DisCal database health check failed!", ex) - - Health.outOfService().withException(ex).build() - } - } -} diff --git a/docker-compose.yml b/docker-compose.yml index bc746853..72973873 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -38,6 +38,7 @@ services: ports: - "8081:8080" - "5006:5005" + - "8008:8008" volumes: - ./.docker/cam:/discal working_dir: /discal