Replace the ⚓ emoji with a real logo image used as the in-app brand mark and the favicon. Default bundled public/logo.svg is the HangmanLab mark recolored to the Foundry-Deck ember (#ff6a1a). Override at deploy time via HARBORFORGE_LOGO_URL (injected into runtime-config.js; getLogoUrl() + favicon swap), no rebuild needed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
31 lines
1.2 KiB
Docker
31 lines
1.2 KiB
Docker
# Build stage
|
|
FROM node:20-alpine AS build
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json* ./
|
|
RUN npm install
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
# Runtime stage
|
|
FROM node:20-alpine
|
|
RUN npm install -g serve@14
|
|
WORKDIR /app
|
|
COPY --from=build /app ./
|
|
ENV FRONTEND_DEV_MODE=0
|
|
# OIDC-only mode flag. Injected into the SPA at container start as
|
|
# /runtime-config.js so the setup wizard knows it before the backend
|
|
# exists; /auth/config remains authoritative once the backend is up.
|
|
ARG HARBORFORGE_OIDC_ONLY=false
|
|
ENV HARBORFORGE_OIDC_ONLY=${HARBORFORGE_OIDC_ONLY}
|
|
# Optional deploy-time branding override: a URL the SPA uses for the
|
|
# logo + favicon. Empty → bundled /logo.svg default.
|
|
ARG HARBORFORGE_LOGO_URL=
|
|
ENV HARBORFORGE_LOGO_URL=${HARBORFORGE_LOGO_URL}
|
|
EXPOSE 3000
|
|
CMD ["sh", "-c", "\
|
|
if [ \"$HARBORFORGE_OIDC_ONLY\" = \"true\" ]; then OO=true; else OO=false; fi; \
|
|
CFG=\"window.__HF_RUNTIME__={\\\"oidc_only\\\":$OO,\\\"logo_url\\\":\\\"$HARBORFORGE_LOGO_URL\\\"};\"; \
|
|
mkdir -p public; printf '%s' \"$CFG\" > public/runtime-config.js; \
|
|
[ -d dist ] && printf '%s' \"$CFG\" > dist/runtime-config.js; \
|
|
if [ \"$FRONTEND_DEV_MODE\" = \"1\" ]; then npm run dev -- --host 0.0.0.0 --port 3000 --strictPort; else serve -s dist -l 3000; fi"]
|