chore: move collabora-office to own file
This commit is contained in:
parent
3f073a83c4
commit
9aa9ef973f
3 changed files with 36 additions and 33 deletions
services
35
services/collabora-office.nix
Normal file
35
services/collabora-office.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
_:
|
||||
|
||||
{
|
||||
virtualisation.oci-containers.containers.collabora-office = {
|
||||
image = "docker.io/collabora/code";
|
||||
ports = [ "9980:9980" ];
|
||||
environment = let
|
||||
mkAlias = domain:
|
||||
"https://" + (builtins.replaceStrings [ "." ] [ "\\." ] domain)
|
||||
+ ":443";
|
||||
in {
|
||||
server_name = "office.felschr.com";
|
||||
aliasgroup1 = mkAlias "office.felschr.com";
|
||||
aliasgroup2 = mkAlias "cloud.felschr.com";
|
||||
extra_params = "--o:ssl.enable=false --o:ssl.termination=true";
|
||||
};
|
||||
extraOptions = [
|
||||
"--network=host"
|
||||
"--cap-add=MKNOD"
|
||||
"--label=io.containers.autoupdate=registry"
|
||||
];
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."office.felschr.com" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:9980";
|
||||
proxyWebsockets = true;
|
||||
extraConfig = ''
|
||||
proxy_read_timeout 36000s;
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue