35 lines
1,002 B
Nix
35 lines
1,002 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
services.mongodb = {
|
|
enable = true;
|
|
extraConfig = ''
|
|
replication:
|
|
replSetName: "rs01"
|
|
'';
|
|
};
|
|
virtualisation.oci-containers.containers."rocketchat" = {
|
|
autoStart = true;
|
|
environment = {
|
|
ROOT_URL = "https://chat.uref.hacc.media";
|
|
MONGO_URL = "mongodb://localhost:27017/rocketchat";
|
|
MONGO_OPLOG_URL = "mongodb://localhost:27017/local";
|
|
Accounts_UseDNSDomainCheck = "false";
|
|
};
|
|
image = "rocketchat/rocket.chat:3.1.1";
|
|
extraOptions = [ "--network=host" ];
|
|
};
|
|
services.nginx.virtualHosts."chat.uref.hacc.media" = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
locations."/" = {
|
|
proxyPass = "http://127.0.0.1:3000";
|
|
extraConfig = "
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
proxy_set_header X-Forwarded-Host $http_host;
|
|
";
|
|
};
|
|
};
|
|
}
|