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 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-01 17:47:47 +00:00
parent 64efa435c8
commit 87043ba6af
5 changed files with 11 additions and 6 deletions

View file

@ -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

View file

@ -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:

View file

@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#0f1f35" />
<title>HNF Manage</title>
<title>%VITE_HOTEL_NAME% · Manage</title>
</head>
<body>
<div id="root"></div>

View file

@ -20,10 +20,10 @@ export function Sidebar({ user, activeSlug }: Props) {
}}>
<div style={{ padding: '1.25rem 1rem 1rem', borderBottom: '1px solid var(--surface-2)' }}>
<div style={{ color: 'var(--gold)', fontWeight: 700, fontSize: '0.9rem', letterSpacing: '0.05em' }}>
HNF MANAGE
MANAGE
</div>
<div style={{ color: 'var(--text-muted)', fontSize: '0.75rem', marginTop: '0.2rem' }}>
Hotel Number Four
{import.meta.env.VITE_HOTEL_NAME}
</div>
</div>

View file

@ -35,9 +35,9 @@ export function Login() {
<div style={{ width: '100%', maxWidth: '360px' }}>
<div style={{ textAlign: 'center', marginBottom: '2rem' }}>
<div style={{ fontSize: '2rem', marginBottom: '0.5rem' }}>🏨</div>
<h1 style={{ fontSize: '1.5rem', color: 'var(--gold)', letterSpacing: '0.05em' }}>HNF MANAGE</h1>
<h1 style={{ fontSize: '1.5rem', color: 'var(--gold)', letterSpacing: '0.05em' }}>MANAGE</h1>
<p style={{ color: 'var(--text-muted)', fontSize: '0.85rem', marginTop: '0.25rem' }}>
Hotel Number Four
{import.meta.env.VITE_HOTEL_NAME}
</p>
</div>