photoprism fix

This commit is contained in:
Anish Lakhwara 2023-05-16 00:19:09 +10:00
parent 55c47ec2aa
commit 05038f2001

View file

@ -15,37 +15,33 @@
services.photoprism = {
enable = true;
package = pkgs.unstable.photoprism;
port = 2342;
port = 5152;
originalsPath = "/var/lib/private/photoprism/originals";
address = "0.0.0.0";
settings = {
PHOTOPRISM_ADMIN_USER = "admin";
PHOTOPRISM_ADMIN_PASSWORD = "...";
PHOTOPRISM_ADMIN_PASSWORD = "photoprism"; # initial password, do change it!
PHOTOPRISM_DEFAULT_LOCALE = "en";
PHOTOPRISM_DATABASE_DRIVER = "postgres";
PHOTOPRISM_DATABASE_NAME = "photoprism";
PHOTOPRISM_DATABASE_SERVER = "/run/postgresql/";
PHOTOPRISM_DATABASE_USER = "photoprism";
PHOTOPRISM_SITE_URL = "http://photos.mossnet.lan:2342";
PHOTOPRISM_SITE_URL = "http://photos.mossnet.lan/";
PHOTOPRISM_SITE_TITLE = "mossnet photos";
};
};
services.nginx.clientMaxBodySize = "500m";
services.nginx.recommendedProxySettings = true;
services.nginx.virtualHosts."photos.mossnet.lan" = {
enableACME = false;
forceSSL = false;
recommendedOptimisation = true;
recommendedGzipSettings = true;
recommendedProxySettings = true;
clientMaxBodySize = "500m";
locations."/" = {
proxyPass = "http://127.0.0.1:2342";
extraConfig = ''
proxy_pass http://localhost:5152/;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
'';
};
};