From 832eb4afd9d72c465a8a848995e4376faee1caf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 15 Oct 2024 14:17:16 -0700 Subject: [PATCH] nixos/immich: change default port to 2283 This was always upstream's default but they also change the internal port, i.e. behind the reverse proxy, to 2283 in https://github.com/immich-app/immich/pull/13185. --- nixos/modules/services/web-apps/immich.nix | 2 +- nixos/tests/web-apps/immich.nix | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/nixos/modules/services/web-apps/immich.nix b/nixos/modules/services/web-apps/immich.nix index c1a30c6ff2b3c..a8a222974fdca 100644 --- a/nixos/modules/services/web-apps/immich.nix +++ b/nixos/modules/services/web-apps/immich.nix @@ -91,7 +91,7 @@ in }; port = mkOption { type = types.port; - default = 3001; + default = 2283; description = "The port that immich will listen on."; }; openFirewall = mkOption { diff --git a/nixos/tests/web-apps/immich.nix b/nixos/tests/web-apps/immich.nix index f03b9290f7a59..8004afd93c05d 100644 --- a/nixos/tests/web-apps/immich.nix +++ b/nixos/tests/web-apps/immich.nix @@ -26,24 +26,24 @@ import ../make-test-python.nix ( machine.wait_for_unit("immich-server.service") - machine.wait_for_open_port(3001) # Server + machine.wait_for_open_port(2283) # Server machine.wait_for_open_port(3003) # Machine learning - machine.succeed("curl --fail http://localhost:3001/") + machine.succeed("curl --fail http://localhost:2283/") machine.succeed(""" - curl -H 'Content-Type: application/json' --data '{ "email": "test@example.com", "name": "Admin", "password": "admin" }' -X POST http://localhost:3001/api/auth/admin-sign-up + curl -H 'Content-Type: application/json' --data '{ "email": "test@example.com", "name": "Admin", "password": "admin" }' -X POST http://localhost:2283/api/auth/admin-sign-up """) res = machine.succeed(""" - curl -H 'Content-Type: application/json' --data '{ "email": "test@example.com", "password": "admin" }' -X POST http://localhost:3001/api/auth/login + curl -H 'Content-Type: application/json' --data '{ "email": "test@example.com", "password": "admin" }' -X POST http://localhost:2283/api/auth/login """) token = json.loads(res)['accessToken'] res = machine.succeed(""" - curl -H 'Content-Type: application/json' -H 'Cookie: immich_access_token=%s' --data '{ "name": "API Key", "permissions": ["all"] }' -X POST http://localhost:3001/api/api-keys + curl -H 'Content-Type: application/json' -H 'Cookie: immich_access_token=%s' --data '{ "name": "API Key", "permissions": ["all"] }' -X POST http://localhost:2283/api/api-keys """ % token) key = json.loads(res)['secret'] - machine.succeed(f"immich login http://localhost:3001/api {key}") + machine.succeed(f"immich login http://localhost:2283/api {key}") res = machine.succeed("immich server-info") print(res) '';