nixos/discourse: Update redis server settings...

...to match the updated redis module.
main
talyz 2 years ago
parent 9b891e6f64
commit 068c5a0c80
No known key found for this signature in database
GPG Key ID: 2DED2151F4671A2B
  1. 11
      nixos/modules/services/web-apps/discourse.nix

@ -656,7 +656,12 @@ in
long_polling_interval = null;
};
services.redis.enable = lib.mkDefault (cfg.redis.host == "localhost");
services.redis.servers.discourse =
lib.mkIf (lib.elem cfg.redis.host [ "localhost" "127.0.0.1" ]) {
enable = true;
bind = cfg.redis.host;
port = cfg.backendSettings.redis_port;
};
services.postgresql = lib.mkIf databaseActuallyCreateLocally {
enable = true;
@ -697,12 +702,12 @@ in
systemd.services.discourse = {
wantedBy = [ "multi-user.target" ];
after = [
"redis.service"
"redis-discourse.service"
"postgresql.service"
"discourse-postgresql.service"
];
bindsTo = [
"redis.service"
"redis-discourse.service"
] ++ lib.optionals (cfg.database.host == null) [
"postgresql.service"
"discourse-postgresql.service"

Loading…
Cancel
Save