Add minification of html, css, & js and brotli compression to reduce page size

This commit is contained in:
Peter Stockings
2026-03-14 23:55:01 +11:00
parent f7ce1c3fd6
commit 25aa7de043
7 changed files with 89 additions and 4 deletions

View File

@@ -7,6 +7,7 @@ WORKDIR /app
# Copy only the necessary files for TailwindCSS build
COPY package.json package-lock.json ./
COPY ./app/templates ./app/templates
COPY ./app/static/js ./app/static/js
COPY tailwind.config.js ./
# Install Node.js dependencies
@@ -39,6 +40,7 @@ COPY . .
# Copy the built TailwindCSS assets from the first stage
COPY --from=tailwind-builder /app/app/static/css/tailwind.css ./app/static/css/tailwind.css
COPY --from=tailwind-builder /app/app/static/js/diy-turbo.min.js ./app/static/js/diy-turbo.min.js
# Run tests during the build process
RUN pytest --maxfail=5 --disable-warnings -v || (echo "Tests failed. Exiting." && exit 1)