Add js and css integration
This commit is contained in:
+14
-4
@@ -1,11 +1,21 @@
|
||||
FROM node:22-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
COPY assets/ ./assets/
|
||||
COPY templates/ ./templates/
|
||||
|
||||
# JS bauen
|
||||
RUN ./node_modules/.bin/esbuild ./assets/javascript/test.js --bundle --outfile=./public/build/app.js --minify
|
||||
|
||||
# CSS bauen
|
||||
RUN ./node_modules/.bin/tailwindcss -i ./assets/css/app.css -o ./public/build/app.css --minify
|
||||
|
||||
FROM php:8.3-apache
|
||||
|
||||
RUN a2enmod rewrite
|
||||
|
||||
COPY . /var/www/html
|
||||
|
||||
COPY --from=builder /app/public/build /var/www/html/public/build
|
||||
RUN sed -i 's|/var/www/html|/var/www/html/public|g' \
|
||||
/etc/apache2/sites-available/000-default.conf
|
||||
|
||||
RUN sed -i 's|AllowOverride None|AllowOverride All|g' \
|
||||
/etc/apache2/apache2.conf
|
||||
Reference in New Issue
Block a user