Skip to content

Commit 50b6799

Browse files
MDA2AVclaude
andcommitted
Bind all servers to 0.0.0.0 so they are reachable inside Docker
Servers were binding to localhost/127.0.0.1 which only listens on the container loopback, causing connection errors when the probe connects via Docker port mapping. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e8c5dcc commit 50b6799

9 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/Servers/ActixServer/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ async fn main() -> std::io::Result<()> {
1616
HttpServer::new(|| {
1717
App::new().default_service(web::to(ok))
1818
})
19-
.bind(("127.0.0.1", port))?
19+
.bind(("0.0.0.0", port))?
2020
.run()
2121
.await
2222
}

src/Servers/AspNetMinimal/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var builder = WebApplication.CreateBuilder(args);
22

3-
builder.WebHost.UseUrls("http://localhost:8080");
3+
builder.WebHost.UseUrls("http://+:8080");
44

55
var app = builder.Build();
66

src/Servers/BunServer/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const port = parseInt(Bun.argv[2] || "8080", 10);
22

33
Bun.serve({
44
port,
5-
hostname: "127.0.0.1",
5+
hostname: "0.0.0.0",
66
fetch() {
77
return new Response("OK");
88
},

src/Servers/FlaskServer/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ def catch_all(path):
1010

1111
if __name__ == "__main__":
1212
port = int(sys.argv[1]) if len(sys.argv) > 1 else 9002
13-
app.run(host="127.0.0.1", port=port)
13+
app.run(host="0.0.0.0", port=port)

src/Servers/GlyphServer/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
var port = args.Length > 0 && int.TryParse(args[0], out var p) ? p : 5098;
1212

13-
var listener = new TcpListener(IPAddress.Loopback, port);
13+
var listener = new TcpListener(IPAddress.Any, port);
1414
listener.Start();
1515

1616
Console.WriteLine($"GlyphServer listening on http://localhost:{port}");

src/Servers/NtexServer/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ async fn main() -> std::io::Result<()> {
1414
web::server(|| {
1515
web::App::new().default_service(web::to(ok))
1616
})
17-
.bind(("127.0.0.1", port))?
17+
.bind(("0.0.0.0", port))?
1818
.run()
1919
.await?;
2020

src/Servers/PingoraServer/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ fn main() {
4949
server.bootstrap();
5050

5151
let mut proxy = http_proxy_service(&server.configuration, OkProxy);
52-
proxy.add_tcp(&format!("127.0.0.1:{port}"));
52+
proxy.add_tcp(&format!("0.0.0.0:{port}"));
5353
server.add_service(proxy);
5454

5555
server.run_forever();

src/Servers/SiskServer/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
var port = args.Length > 0 && int.TryParse(args[0], out var p) ? p : 8080;
55

66
using var app = HttpServer.CreateBuilder()
7-
.UseListeningPort($"http://localhost:{port}/")
7+
.UseListeningPort($"http://+:{port}/")
88
.Build();
99

1010
app.Router.SetRoute(RouteMethod.Any, Route.AnyPath, request =>

src/Servers/WatsonServer/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
var port = args.Length > 0 && int.TryParse(args[0], out var p) ? p : 8080;
55

6-
var settings = new WebserverSettings("127.0.0.1", port);
6+
var settings = new WebserverSettings("*", port);
77
var server = new Webserver(settings, async ctx =>
88
{
99
ctx.Response.StatusCode = 200;

0 commit comments

Comments
 (0)