This commit is contained in:
parent
21a87a3eb3
commit
fb6a61d5b6
12
Dockerfile
12
Dockerfile
@@ -85,6 +85,15 @@ COPY --link frankenphp/conf.d/app.dev.ini $PHP_INI_DIR/conf.d/
|
||||
|
||||
CMD [ "frankenphp", "run", "--config", "/etc/caddy/Caddyfile", "--watch" ]
|
||||
|
||||
# Stage Node.js pour compiler les assets (Webpack Encore)
|
||||
FROM node:22-alpine AS node_build
|
||||
WORKDIR /app
|
||||
COPY --link package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY --link assets ./assets
|
||||
COPY --link webpack.config.js ./
|
||||
RUN npm run build
|
||||
|
||||
# Prod FrankenPHP image
|
||||
FROM frankenphp_base AS frankenphp_prod
|
||||
|
||||
@@ -105,6 +114,9 @@ RUN set -eux; \
|
||||
COPY --link . ./
|
||||
RUN rm -Rf frankenphp/
|
||||
|
||||
# Copier les assets compilés depuis le stage Node.js
|
||||
COPY --from=node_build /app/public/build ./public/build
|
||||
|
||||
RUN set -eux; \
|
||||
mkdir -p var/cache var/log; \
|
||||
composer dump-autoload --classmap-authoritative --no-dev; \
|
||||
|
||||
Reference in New Issue
Block a user