- fix: docker libssl in slim image
- fix: api service default rest api address and port was incorrect - update: database service to use dedicated function for running the health check api
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
FROM rust:1.83 as builder
|
||||
FROM rust:1.83 AS builder
|
||||
LABEL authors="raven"
|
||||
|
||||
WORKDIR /usr/src/proto
|
||||
|
||||
@@ -53,12 +53,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
)
|
||||
.await?;
|
||||
|
||||
// Start health-check endpoint
|
||||
let health_route = warp::path!("health")
|
||||
.map(|| warp::reply::with_status("OK", warp::http::StatusCode::OK));
|
||||
|
||||
|
||||
tokio::spawn(warp::serve(health_route).run(health_check_endpoint_addr.to_socket_addrs()?.next().unwrap()));
|
||||
consul_registration::start_health_check(addr.as_str()).await?;
|
||||
|
||||
let full_addr = format!("{}:{}", &addr, port);
|
||||
let address = full_addr.parse().expect("Invalid address");
|
||||
|
||||
Reference in New Issue
Block a user