Specify port & listen address
This commit is contained in:
parent
1d156c3053
commit
0786d1589f
|
@ -162,14 +162,16 @@ let
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
makeLemmyCfg = { hostname, postgresPasswd, pictrsApiKey, smtpServer, siteName
|
makeLemmyCfg = { hostname, port, listenAddr, postgresPasswd, pictrsApiKey
|
||||||
, adminPasswd ? null, ... }:
|
, smtpServer, siteName, adminPasswd ? null, ... }:
|
||||||
pkgs.writeText "lemmy.hjson" (builtins.toJSON {
|
pkgs.writeText "lemmy.hjson" (builtins.toJSON {
|
||||||
database = {
|
database = {
|
||||||
host = "postgres";
|
host = "postgres";
|
||||||
password = postgresPasswd;
|
password = postgresPasswd;
|
||||||
};
|
};
|
||||||
hostname = hostname;
|
hostname = hostname;
|
||||||
|
port = port;
|
||||||
|
bind = listenAddr;
|
||||||
pictrs = {
|
pictrs = {
|
||||||
url = "http://pictrs:8080/";
|
url = "http://pictrs:8080/";
|
||||||
api_key = pictrsApiKey;
|
api_key = pictrsApiKey;
|
||||||
|
@ -332,6 +334,8 @@ in {
|
||||||
smtpServer = cfg.smtp-server;
|
smtpServer = cfg.smtp-server;
|
||||||
adminPasswd = adminPasswd;
|
adminPasswd = adminPasswd;
|
||||||
siteName = cfg.site-name;
|
siteName = cfg.site-name;
|
||||||
|
listenAddr = "0.0.0.0";
|
||||||
|
port = 8536;
|
||||||
};
|
};
|
||||||
target-file = "/run/lemmy/lemmy.hjson";
|
target-file = "/run/lemmy/lemmy.hjson";
|
||||||
};
|
};
|
||||||
|
@ -412,13 +416,6 @@ in {
|
||||||
proxyPass = "http://localhost:${toString cfg.port}";
|
proxyPass = "http://localhost:${toString cfg.port}";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
recommendedProxySettings = 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;
|
|
||||||
# '';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue