From 4b309430194cc1238261c767cf113a9dd9d09b75 Mon Sep 17 00:00:00 2001 From: mo khan Date: Wed, 2 Jul 2025 14:14:53 -0600 Subject: chore: bind to ipv4 address --- .runway/env-staging.yml | 2 +- Makefile | 2 +- src/main.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.runway/env-staging.yml b/.runway/env-staging.yml index 9d86e025..3ba6d762 100644 --- a/.runway/env-staging.yml +++ b/.runway/env-staging.yml @@ -1,2 +1,2 @@ APP_ENV: "production" -BIND_ADDR: "[::1]:50051" +BIND_ADDR: "0.0.0.0:50051" diff --git a/Makefile b/Makefile index eba8ed3b..331cce42 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ build-image: @docker build --no-cache --tag $(IMAGE_TAG) . run-image: build-image - @docker run --rm -p 50051:50051 --init -it $(IMAGE_TAG) + @docker run --rm -p 50051:50051 --env BIND_ADDR=0.0.0.0:50051 --init -it $(IMAGE_TAG) # gRPC testing targets health-check: diff --git a/src/main.rs b/src/main.rs index 8638e14b..fb191ac4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,7 @@ async fn main() -> Result<(), Box> { tracing_subscriber::fmt().json().init(); let addr = std::env::var("BIND_ADDR") - .unwrap_or_else(|_| "[::1]:50051".to_string()) + .unwrap_or_else(|_| "127.0.0.1:50051".to_string()) .parse()?; log::info!("Listening on... {addr}"); -- cgit v1.2.3