sup has a doobie module:

libraryDependencies += "com.kubukoz" %% "sup-doobie" % "0.7.0"

Imports:

import sup.modules.doobie._

What’s included

connectionCheck

You can build a connection check out of a doobie Transactor. Let’s create one first:

import doobie._, cats.effect._

def transactor: Transactor[IO] = ???

And now the health check:

import scala.concurrent.duration._

def doobieCheck = connectionCheck(transactor)(timeout = Some(5.seconds))