Add minification of html, css, & js and brotli compression to reduce page size
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user