fix(etna): proxy immich via frp and nginx
This commit is contained in:
parent
4f3ff236a4
commit
5885a850bf
3 changed files with 26 additions and 2 deletions
|
@ -1,6 +1,9 @@
|
||||||
{ config, ... }:
|
{ config, _utils, ... }:
|
||||||
|
let
|
||||||
|
frp = _utils.mkFrpPassthrough "immich" config.services.immich.port;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
cfTunnels."im.uku.moe" = "http://localhost:${builtins.toString config.services.immich.port}";
|
imports = [ frp ];
|
||||||
|
|
||||||
services.immich = {
|
services.immich = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
./certificates.nix
|
./certificates.nix
|
||||||
./frp.nix
|
./frp.nix
|
||||||
./hetzner.nix
|
./hetzner.nix
|
||||||
|
./nginx.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
20
systems/vesuvio/nginx.nix
Normal file
20
systems/vesuvio/nginx.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
services.nginx.virtualHosts = {
|
||||||
|
# immich
|
||||||
|
"im.uku.moe" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://localhost:2283";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = ''
|
||||||
|
client_max_body_size 5000M;
|
||||||
|
proxy_read_timeout 600s;
|
||||||
|
proxy_send_timeout 600s;
|
||||||
|
send_timeout 600s;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue