From 0786d1589fe222c22662d74e57e390f56f0a1e40 Mon Sep 17 00:00:00 2001 From: niten Date: Mon, 2 Oct 2023 10:09:36 -0700 Subject: [PATCH] Specify port & listen address --- lemmy-docker.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/lemmy-docker.nix b/lemmy-docker.nix index 1c75b1d..c88971a 100644 --- a/lemmy-docker.nix +++ b/lemmy-docker.nix @@ -162,14 +162,16 @@ let } ''; - makeLemmyCfg = { hostname, postgresPasswd, pictrsApiKey, smtpServer, siteName - , adminPasswd ? null, ... }: + makeLemmyCfg = { hostname, port, listenAddr, postgresPasswd, pictrsApiKey + , smtpServer, siteName, adminPasswd ? null, ... }: pkgs.writeText "lemmy.hjson" (builtins.toJSON { database = { host = "postgres"; password = postgresPasswd; }; hostname = hostname; + port = port; + bind = listenAddr; pictrs = { url = "http://pictrs:8080/"; api_key = pictrsApiKey; @@ -332,6 +334,8 @@ in { smtpServer = cfg.smtp-server; adminPasswd = adminPasswd; siteName = cfg.site-name; + listenAddr = "0.0.0.0"; + port = 8536; }; target-file = "/run/lemmy/lemmy.hjson"; }; @@ -412,13 +416,6 @@ in { proxyPass = "http://localhost:${toString cfg.port}"; proxyWebsockets = true; recommendedProxySettings = true; - # extraConfig = '' - # proxy_set_header Host $host; - # proxy_set_header Upgrade $http_upgrade; - # proxy_set_header Connection "Upgrade"; - # proxy_set_header X-Real-IP $remote_addr; - # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - # ''; }; }; };