diff --git a/actix/src/main.rs b/actix/src/main.rs index d496a69..71d66fe 100644 --- a/actix/src/main.rs +++ b/actix/src/main.rs @@ -78,7 +78,7 @@ async fn main() -> Result<()> { } // Tell the user that the server has started, and where it is listening to, rather than simply outputting nothing - eprintln!("Server has started at 0.0.0.0 on port 4567."); + eprintln!("Server has started at 0.0.0.0 on port {port}."); // Actually start the server HttpServer::new(move || { @@ -113,7 +113,7 @@ async fn main() -> Result<()> { .default_service(actix_web::web::get().to(services::error404)) }) // Hardcode the port the server listens to. Allows for more intuitive Docker Compose port management - .bind(("0.0.0.0", 4567))? + .bind(("0.0.0.0", port))? .run() .await } diff --git a/compose.yaml b/compose.yaml index cb88eae..c418884 100644 --- a/compose.yaml +++ b/compose.yaml @@ -8,7 +8,7 @@ services: container_name: chhoto-url ports: # If you changed the "port" environment variable, adjust accordingly - # The number before the colon should match the "port" variable + # Both numbers before and after the colon should match the "port" variable - 4567:4567 environment: # Change if you want to mount the database somewhere else.