From 783b235bcd38633d7e78ee663d6a2b275d0c35d8 Mon Sep 17 00:00:00 2001 From: Bernard Siebens Date: Fri, 7 Aug 2026 17:01:01 +0200 Subject: [PATCH] Fix Tailwind classes missing in production for management/ and club/ templates The Docker image's CSS build stage only COPYed assets, templates, controlpanel and billing before running npm run build -- management and club were never in that build context, even though assets/app.css's @source lines already listed (or, for club, should have listed) them. Any utility class used only inside those two apps' templates was silently absent from the compiled static/css/app.css in production, while working fine locally since `npm run build` there scans the full checkout rather than a Docker COPY subset. This is what made management/home.html's md:grid-cols-5 (the dashboard KPI grid fix from earlier) never take effect on the server: the class just didn't exist in production's CSS, so the grid silently fell back to sm:grid-cols-2 at every width. Verified by reproducing the exact Docker build context outside Docker: md:grid-cols-5 is absent from the compiled CSS with the old COPY list, present with the new one. club/templates has no live bug today (everything it uses is also used elsewhere), but it's the same gap and cheap to close before it bites. --- Dockerfile | 6 ++++++ assets/app.css | 1 + 2 files changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index d300434..a857bb4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,10 +8,16 @@ FROM node:22-slim AS css WORKDIR /build COPY package.json package-lock.json ./ RUN npm ci +# Every directory assets/app.css's @source lines scan -- miss one here and Tailwind's build +# silently emits no utilities for classes used only in that app's templates. Locally `npm run +# build` runs against the full checkout and never shows this; only a container image, built +# from just what's COPYed here, can. COPY assets ./assets COPY templates ./templates COPY controlpanel ./controlpanel COPY billing ./billing +COPY management ./management +COPY club ./club RUN npm run build diff --git a/assets/app.css b/assets/app.css index 224321f..fb94cd0 100644 --- a/assets/app.css +++ b/assets/app.css @@ -6,6 +6,7 @@ @source "../controlpanel"; @source "../billing"; @source "../management"; +@source "../club"; /* daisyUI: light is the default, dark applies automatically when the OS asks for it. An explicit data-theme on (set by the toggle) overrides both. */