From f0c6b79d1acfeb319a42131a084f48223bea930d Mon Sep 17 00:00:00 2001 From: archipelago Date: Sun, 21 Jun 2026 09:20:38 -0400 Subject: [PATCH] fix(immich): name containers underscore to match runtime lifecycle code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit package.stop/start/restart broke ("no containers found" / "no such object immich_postgres") because the runtime hardcodes the immich stack's container names as immich_server/immich_postgres/immich_redis (underscore) across 8 files (lifecycle, health, crash-recovery, ports, config). The migration had named the containers by app_id (hyphen), mismatching all of it. Root cause of the earlier failed attempt: container_name was nested under an `extensions:` block, but `app.extensions` is serde(flatten) — container_name must be a TOP-LEVEL app key to be read by compute_container_name. Fixed: set container_name: immich_server / immich_postgres / immich_redis at top level, and point DB_HOSTNAME/REDIS_HOSTNAME at the underscore aliases. App ids stay hyphen (immich/immich-postgres/immich-redis) so the catalog identity (title+icon) holds. Manifest-only change — container names now match existing runtime references, no code edits to the 8 files. (Deriving stack containers from manifests instead of hardcoded lists remains a north-star follow-up.) Co-Authored-By: Claude Opus 4.8 (1M context) --- apps/immich-postgres/manifest.yml | 9 +++++---- apps/immich-redis/manifest.yml | 4 +++- apps/immich/manifest.yml | 12 ++++++++---- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/apps/immich-postgres/manifest.yml b/apps/immich-postgres/manifest.yml index 6ba96b2a..88f42506 100644 --- a/apps/immich-postgres/manifest.yml +++ b/apps/immich-postgres/manifest.yml @@ -4,10 +4,11 @@ app: version: "14-vectorchord0.4.3-pgvectors0.2.0" description: Postgres (pgvecto.rs / vectorchord) backend for Immich. - # No container_name override: the container is named by app_id (immich-postgres), - # which is also its archy-net alias and the server's DB_HOSTNAME. (Overriding the - # name diverges from the orchestrator's app_id-based naming and spawns duplicate - # containers — mirror the btcpay stack, which names members by app_id.) + # Container named immich_postgres (underscore) to match the runtime's existing + # per-app references (lifecycle/health/crash-recovery/config) and serve as the + # server's DB_HOSTNAME alias. Top-level key → serde(flatten) → extensions → + # compute_container_name. + container_name: immich_postgres container: image: 146.59.87.168:3000/lfg2025/immich-postgres:14-vectorchord0.4.3-pgvectors0.2.0 diff --git a/apps/immich-redis/manifest.yml b/apps/immich-redis/manifest.yml index fabb69db..2450a615 100644 --- a/apps/immich-redis/manifest.yml +++ b/apps/immich-redis/manifest.yml @@ -4,7 +4,9 @@ app: version: "7-alpine" description: Valkey (Redis-compatible) cache for Immich. - # Named by app_id (immich-redis) = archy-net alias = server's REDIS_HOSTNAME. + # Container named immich_redis (underscore) to match runtime per-app references + # and serve as the server's REDIS_HOSTNAME alias on archy-net. + container_name: immich_redis container: image: 146.59.87.168:3000/lfg2025/valkey:7-alpine diff --git a/apps/immich/manifest.yml b/apps/immich/manifest.yml index b2ca3c98..e29c7c01 100644 --- a/apps/immich/manifest.yml +++ b/apps/immich/manifest.yml @@ -5,8 +5,12 @@ app: description: Self-hosted photo and video backup with mobile apps and search. # app_id "immich" = the user-facing launcher (matches the catalog entry's title - # + icon). Container is named "immich"; it reaches its backends by their app_id - # aliases on archy-net (see DB_HOSTNAME / REDIS_HOSTNAME below). + # + icon). The container is named "immich_server" so it matches the runtime's + # existing per-app container references (lifecycle/health/crash-recovery/ports); + # `container_name` is a top-level app key (captured by serde(flatten) into + # extensions, read by compute_container_name). It reaches its backends by their + # underscore aliases on archy-net (DB_HOSTNAME / REDIS_HOSTNAME below). + container_name: immich_server container: image: 146.59.87.168:3000/lfg2025/immich-server:release @@ -42,10 +46,10 @@ app: options: [rw] environment: - - DB_HOSTNAME=immich-postgres + - DB_HOSTNAME=immich_postgres - DB_USERNAME=postgres - DB_DATABASE_NAME=immich - - REDIS_HOSTNAME=immich-redis + - REDIS_HOSTNAME=immich_redis - UPLOAD_LOCATION=/usr/src/app/upload health_check: