feat: update immich

This commit is contained in:
Felix Schröter 2022-08-07 12:17:29 +02:00
parent 9f05386919
commit e721cdf6d7
Signed by: felschr
GPG key ID: 671E39E6744C807D

View file

@ -12,7 +12,7 @@ let
pgSuperUser = config.services.postgresql.superUser; pgSuperUser = config.services.postgresql.superUser;
immichEnv = { immichBase = {
environment = { environment = {
NODE_ENV = "production"; NODE_ENV = "production";
DB_HOSTNAME = containersHost; DB_HOSTNAME = containersHost;
@ -21,10 +21,16 @@ let
DB_DATABASE_NAME = dbname; DB_DATABASE_NAME = dbname;
REDIS_HOSTNAME = containersHost; REDIS_HOSTNAME = containersHost;
REDIS_PORT = toString config.services.redis.servers.immich.port; REDIS_PORT = toString config.services.redis.servers.immich.port;
VITE_SERVER_ENDPOINT = "https://${domain}/api";
}; };
# only secrets need to be included, e.g. DB_PASSWORD, JWT_SECRET, MAPBOX_KEY # only secrets need to be included, e.g. DB_PASSWORD, JWT_SECRET, MAPBOX_KEY
environmentFiles = [ config.age.secrets.immich-env.path ]; environmentFiles = [ config.age.secrets.immich-env.path ];
extraOptions = [
"--network=host"
"--add-host=immich-server:127.0.0.1"
"--add-host=immich-microservices:127.0.0.1"
"--add-host=immich-machine-learning:127.0.0.1"
"--add-host=immich-web:127.0.0.1"
];
}; };
in { in {
age.secrets.immich-env.file = ../secrets/immich/.env.age; age.secrets.immich-env.file = ../secrets/immich/.env.age;
@ -72,37 +78,33 @@ in {
}; };
virtualisation.oci-containers.containers = { virtualisation.oci-containers.containers = {
immich-server = immichEnv // { immich-server = immichBase // {
image = "altran1502/immich-server:release"; image = "altran1502/immich-server:release";
ports = [ "3001:3001" ]; ports = [ "3001:3001" ];
entrypoint = "/bin/sh"; entrypoint = "/bin/sh";
cmd = [ "./start-server.sh" ]; cmd = [ "./start-server.sh" ];
volumes = [ "${uploadDir}:/usr/src/app/upload" ]; volumes = [ "${uploadDir}:/usr/src/app/upload" ];
extraOptions = [ "--network=host" ];
}; };
immich-microservices = immichEnv // { immich-microservices = immichBase // {
image = "altran1502/immich-server:release"; image = "altran1502/immich-server:release";
entrypoint = "/bin/sh"; entrypoint = "/bin/sh";
cmd = [ "./start-microservices.sh" ]; cmd = [ "./start-microservices.sh" ];
volumes = [ "${uploadDir}:/usr/src/app/upload" ]; volumes = [ "${uploadDir}:/usr/src/app/upload" ];
extraOptions = [ "--network=host" ];
}; };
immich-machine-learning = immichEnv // { immich-machine-learning = immichBase // {
image = "altran1502/immich-machine-learning:release"; image = "altran1502/immich-machine-learning:release";
entrypoint = "/bin/sh"; entrypoint = "/bin/sh";
cmd = [ "./entrypoint.sh" ]; cmd = [ "./entrypoint.sh" ];
volumes = [ "${uploadDir}:/usr/src/app/upload" ]; volumes = [ "${uploadDir}:/usr/src/app/upload" ];
extraOptions = [ "--network=host" ];
}; };
immich-web = immichEnv // { immich-web = immichBase // {
image = "altran1502/immich-web:release"; image = "altran1502/immich-web:release";
ports = [ "3000:3000" ]; ports = [ "3000:3000" ];
entrypoint = "/bin/sh"; entrypoint = "/bin/sh";
cmd = [ "./entrypoint.sh" ]; cmd = [ "./entrypoint.sh" ];
extraOptions = [ "--network=host" ];
}; };
}; };