build pipeline, health check works again

This commit is contained in:
Andre Heber
2024-02-19 17:49:19 +01:00
parent 39b6e11885
commit 329fd5b86c
7 changed files with 95 additions and 20 deletions

View File

@ -12,9 +12,9 @@ async fn main() -> std::io::Result<()> {
let config = get_configuration().expect("Failed to read configuration");
let connection_pool = PgPoolOptions::new()
.max_connections(10).connect(config.database.connection_string().expose_secret()).await.expect("Failed to connect to Postgres.");
.max_connections(10).connect_lazy(config.database.connection_string().expose_secret()).expect("Failed to connect to Postgres.");
let address = format!("127.0.0.1:{}", config.application_port);
let address = format!("{}:{}", config.application.host, config.application.port);
let listener = TcpListener::bind(address).expect("Failed to bind random port");
run(listener, connection_pool)?.await
}