Skip to content

Commit

Permalink
fix(): fix on reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
Christiantyemele committed Nov 20, 2024
1 parent 9e812b1 commit 8f790a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN cargo build --release
# Use a minimal image for running the server
FROM ubuntu

RUN apt update && apt install -y libpq5
RUN apt update && apt install -y libpq5 && rm -rf /var/lib/apt/lists/*
WORKDIR /app


Expand Down
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ async fn main() {

// Start server
let port = std::env::var("SERVER_LOCAL_PORT").unwrap_or("3000".to_owned());
let addr: SocketAddr = format!("0.0.0.0:{port}").parse().unwrap();
let ip = std::env::var("SERVER_PUBLIC_IP").unwrap_or("0.0.0.0".to_owned());
let addr: SocketAddr = format!("{ip}:{port}").parse().unwrap();

tracing::info!("listening on {addr}");
generic_server_with_graceful_shutdown(addr).await;
Expand Down

0 comments on commit 8f790a3

Please sign in to comment.