server {
  host = "0.0.0.0"
  host = ${?SERVER_HOST}
  port = 8080
  port = ${?SERVER_PORT}
}

# Database configuration for ZIO config (used by AppConfig.DatabaseConfig)
database {
  host = "localhost"
  host = ${?DB_HOST}
  port = 5432
  port = ${?DB_PORT}
  database = "summercms"
  database = ${?DB_NAME}
  user = "summercms"
  user = ${?DB_USER}
  password = "summercms"
  password = ${?DB_PASSWORD}
}

# HikariCP configuration for Quill DataSource
# Uses separate prefix to avoid conflict with ZIO config "database" property
hikari {
  dataSourceClassName = "org.postgresql.ds.PGSimpleDataSource"
  dataSource {
    serverName = "localhost"
    serverName = ${?DB_HOST}
    portNumber = 5432
    portNumber = ${?DB_PORT}
    databaseName = "summercms"
    databaseName = ${?DB_NAME}
    user = "summercms"
    user = ${?DB_USER}
    password = "summercms"
    password = ${?DB_PASSWORD}
  }
  # HikariCP pool settings
  maximumPoolSize = 10
  connectionTimeout = 30000
}
