From 87043ba6afd53c1bf9b01ae80a1dd5151d8b7920 Mon Sep 17 00:00:00 2001 From: jtricerolph Date: Wed, 1 Jul 2026 17:47:47 +0000 Subject: [PATCH] Make hotel name configurable via VITE_HOTEL_NAME build arg Defaults to 'Number Four at Stow'. Replaces hardcoded 'Hotel Number Four' and 'HNF Manage' in sidebar, login page, and browser title. Other hotels set VITE_HOTEL_NAME in their /opt/portal/.env before rebuilding. Co-Authored-By: Claude Sonnet 4.6 --- Dockerfile | 2 ++ docker-compose.yml | 5 ++++- index.html | 2 +- src/components/Sidebar.tsx | 4 ++-- src/pages/Login.tsx | 4 ++-- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index c77a7b7..1f6f30a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,8 @@ WORKDIR /app COPY package.json . RUN npm install COPY . . +ARG VITE_HOTEL_NAME="Number Four at Stow" +ENV VITE_HOTEL_NAME=$VITE_HOTEL_NAME RUN npm run build FROM nginx:alpine diff --git a/docker-compose.yml b/docker-compose.yml index dd5b443..bde53ee 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,9 @@ services: portal: - build: . + build: + context: . + args: + VITE_HOTEL_NAME: ${VITE_HOTEL_NAME:-Number Four at Stow} security_opt: - apparmor=unconfined ports: diff --git a/index.html b/index.html index 556fb91..7c9538d 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - HNF Manage + %VITE_HOTEL_NAME% · Manage
diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index 2dfe201..ba1504e 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -20,10 +20,10 @@ export function Sidebar({ user, activeSlug }: Props) { }}>
- HNF MANAGE + MANAGE
- Hotel Number Four + {import.meta.env.VITE_HOTEL_NAME}
diff --git a/src/pages/Login.tsx b/src/pages/Login.tsx index 2123f65..57abf5b 100644 --- a/src/pages/Login.tsx +++ b/src/pages/Login.tsx @@ -35,9 +35,9 @@ export function Login() {
🏨
-

HNF MANAGE

+

MANAGE

- Hotel Number Four + {import.meta.env.VITE_HOTEL_NAME}