mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 08:18:10 +01:00
The product, its assistant, the repo, the host and every unit on the box now share one name. 638 files, ~3,000 mentions: UI copy, config, env keys (FLEETCROWN_* -> LOKI_*), systemd units (fleetcrown-* -> loki-*), docs, articles, the deploy workflow other repos reuse, and nine file names. - Three article slugs carried the old name and had been shared; permanent redirects keep those links alive (next.config.ts). - test-no-retired-name.sh now also forbids the old product name across the whole repo, so the rename cannot creep back through templates and examples. - ASSISTANT_STACK collapses the product and the assistant into one entry, because they are now the same name. Infra was cut over ahead of this merge: /opt/loki, loki-* units, the `loki` database and role, loki.orangecat.ch (old host 308s to it; /api, /widget, /embed keep proxying), GitHub repos bitbaum/loki and bitbaum/loki-releases. The Resend sending domain stays fleetcrown.orangecat.ch until the new domain is verified in DNS. Claude-Session: https://claude.ai/code/session_016YJVAanfj8keVSXyZnTemh Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
41 lines
1.6 KiB
Bash
41 lines
1.6 KiB
Bash
# shellcheck shell=bash
|
|
# Shell-side mirror of the product brand. The canonical SSOT is
|
|
# src/config/brand.ts — this file exists so shell scripts have the same
|
|
# rebrand lever the TypeScript side does. Keep the four values below in sync
|
|
# with brand.ts (APP_NAME / APP_SLUG / APP_DOMAIN / BRIDGE_DOMAIN); nothing
|
|
# else here may redefine the brand.
|
|
#
|
|
# Usage: source "$(dirname "${BASH_SOURCE[0]}")/_brand.sh" # adjust path
|
|
#
|
|
# Note on slug vs. display name: APP_SLUG is also the infra identifier baked
|
|
# into the `loki` database, the `loki-app` systemd unit, and the
|
|
# repo path. Those intentionally do NOT change on a display rebrand — only
|
|
# APP_NAME (and possibly APP_DOMAIN) do. That is why a rename is "Tier A"
|
|
# (display + copy) and leaves the slug-tied infrastructure untouched.
|
|
|
|
# Guard against double-sourcing.
|
|
[ -n "${_LOKI_BRAND_SOURCED:-}" ] && return 0
|
|
_LOKI_BRAND_SOURCED=1
|
|
|
|
APP_NAME="Loki" # display string
|
|
APP_SLUG="loki" # lowercase kebab; URLs, paths, infra ids
|
|
APP_DOMAIN="loki.orangecat.ch" # canonical hostname (no scheme)
|
|
BRIDGE_DOMAIN="bridge.orangecat.ch" # shared SSE fan-out host
|
|
|
|
APP_URL="https://${APP_DOMAIN}"
|
|
BRIDGE_URL="https://${BRIDGE_DOMAIN}/sse"
|
|
|
|
export APP_NAME APP_SLUG APP_DOMAIN BRIDGE_DOMAIN APP_URL BRIDGE_URL
|
|
|
|
# Resolve APP_<SUFFIX> → LOKI_<SUFFIX> → COCKPIT_<SUFFIX> (legacy).
|
|
# Usage: token="$(_brand_env SESSION_TOKEN)"
|
|
_brand_env() {
|
|
local suffix="$1"
|
|
local fallback="${2:-}"
|
|
local app="APP_${suffix}"
|
|
local fleet="LOKI_${suffix}"
|
|
local legacy="COCKPIT_${suffix}"
|
|
printf '%s' "${!app:-${!fleet:-${!legacy:-$fallback}}}"
|
|
}
|
|
export -f _brand_env
|