feat(docker): prepare portable images with runtime hotel configuration
CI / check (push) Successful in 1m6s
CI / deploy (push) Successful in 1m23s

This commit is contained in:
Simo committed 2026-09-07 22:37:53 +02:00
1 parent 745d0b7247
commit c4496e710b
28 files changed
+622 -104

No files matched your search

+2 -17
View File
@@ -1,28 +1,13 @@
/**
* Avatar imager helpers.
*
* The public-facing imager URL is configured via NEXT_PUBLIC_IMAGER_URL env var.
* Defaults to epicnabbo.nl imager with effect=14 and img_format=apng.
* Browser and server markup use the same runtime-configured avatar proxy.
*/
export type { AvatarOptions } from "@/types/admin";
import type { AvatarOptions } from "@/types/admin";
const DEFAULT_IMAGER_URL = "https://epicnabbo.nl/imaging/avatarimage";
/**
* Resolve the public-facing imager base URL from env.
* Falls back to epicnabbo.nl if not configured.
*/
export function resolveImagerBase(): string {
const fromEnv = process.env.NEXT_PUBLIC_IMAGER_URL?.trim();
if (!fromEnv) {
return DEFAULT_IMAGER_URL;
}
return fromEnv.replace(/\/+$/, "");
}
/**
* Build an avatar image URL using the configured imager.
* Uses effect=14 and img_format=apng by default for epicnabbo.nl compatibility.
@@ -59,6 +44,6 @@ export function getAvatarUrl(
if (gesture) params.set("gesture", gesture);
if (action) params.set("action", action);
const base = resolveImagerBase();
const base = "/api/imaging/avatar";
return `${base}?${params.toString()}`;
}