feat(01-02): add /ready endpoint with database connectivity check
- Add GET /ready endpoint that checks database connection - Returns 200 'ready' when connected, 503 when not - Update Routes to require DataSource dependency - Provide dataSourceLayer in Main.scala - Use 'hikari' prefix for HikariCP config to avoid ZIO config conflict
This commit is contained in:
@@ -5,7 +5,7 @@ server {
|
||||
port = ${?SERVER_PORT}
|
||||
}
|
||||
|
||||
# Database configuration for ZIO config (used by AppConfig)
|
||||
# Database configuration for ZIO config (used by AppConfig.DatabaseConfig)
|
||||
database {
|
||||
host = "localhost"
|
||||
host = ${?DB_HOST}
|
||||
@@ -20,8 +20,8 @@ database {
|
||||
}
|
||||
|
||||
# HikariCP configuration for Quill DataSource
|
||||
# Reads from "database" prefix via Quill.DataSource.fromPrefix
|
||||
database {
|
||||
# Uses separate prefix to avoid conflict with ZIO config "database" property
|
||||
hikari {
|
||||
dataSourceClassName = "org.postgresql.ds.PGSimpleDataSource"
|
||||
dataSource {
|
||||
serverName = "localhost"
|
||||
|
||||
Reference in New Issue
Block a user