diff --git a/modules/buildbot/default.nix b/modules/buildbot/default.nix index f6a7b27..197b43f 100644 --- a/modules/buildbot/default.nix +++ b/modules/buildbot/default.nix @@ -88,15 +88,16 @@ in extraConfig = '' ssl_session_timeout 1440m; ssl_session_cache shared:SSL:10m; + proxy_set_header Upgrade $http_upgrade; ''; - locations."/".proxyPass = "http://127.0.0.1:1810/"; + locations."/".proxyPass = "http://[::]:1810/"; locations."/sse" = { - proxyPass = "http://127.0.0.1:1810/sse/"; + proxyPass = "http://[::]:1810/sse/"; # proxy buffering will prevent sse to work extraConfig = "proxy_buffering off;"; }; locations."/ws" = { - proxyPass = "http://127.0.0.1:1810/ws"; + proxyPass = "http://[::]:1810/ws"; proxyWebsockets = true; # raise the proxy timeout for the websocket extraConfig = "proxy_read_timeout 6000s;"; diff --git a/modules/buildbot/master.py b/modules/buildbot/master.py index ec389a1..e2f6b57 100644 --- a/modules/buildbot/master.py +++ b/modules/buildbot/master.py @@ -225,7 +225,7 @@ def build_config() -> dict[str, Any]: c["www"] = { "avatar_methods": [util.AvatarGitHub()], - "port": int(os.environ.get("PORT", "1810")), + 'port': "tcp:1810:interface=\\:\\:", "auth": util.GitHubAuth("bba3e144501aa5b8a5dd", str(read_secret_file("github-oauth-secret")).strip()), "authz": util.Authz( roleMatchers=[ @@ -269,7 +269,7 @@ def build_config() -> dict[str, Any]: c["db"] = {"db_url": os.environ.get("DB_URL", "sqlite:///state.sqlite")} - c["protocols"] = {"pb": {"port": "tcp:9989:interface=127.0.0.1"}} + c['protocols'] = {'pb': {'port': "tcp:interface=\\:\\::port=9989"}} c["buildbotURL"] = BUILDBOT_URL c["collapseRequests"] = False