1- # ####### Clients [Screen|Admin] build ########
2- FROM --platform=$BUILDPLATFORM node:24-alpine AS client_app_builder
1+ # ###############################
2+ # Assets build
3+ # ###############################
4+ FROM --platform=$BUILDPLATFORM node:24-alpine AS assets_builder
35LABEL maintainer="ITK Dev <itkdev@mkb.aarhus.dk>"
46
57ARG APP_VERSION="develop"
@@ -20,7 +22,9 @@ COPY assets/ ./assets/
2022RUN npm run build
2123
2224
23- # ######## API backend build ########
25+ # ###############################
26+ # API backend build
27+ # ###############################
2428FROM --platform=$BUILDPLATFORM itkdev/php8.4-fpm:latest AS api_app_builder
2529LABEL maintainer="ITK Dev <itkdev@mkb.aarhus.dk>"
2630
@@ -34,10 +38,15 @@ COPY --chown=deploy:deploy . ./
3438# Composer packages first
3539RUN APP_ENV=prod composer install --no-dev --optimize-autoloader --classmap-authoritative
3640
41+ COPY --chown=deploy:deploy --from=assets_builder /app/public/build /app/public/
42+
3743# Remove files we do not need to the final image
3844RUN rm -rf package* vite.config.js
3945
40- # ####### PHP-FPM (API) production image ########
46+
47+ # ###############################
48+ # PHP-FPM (API) production image
49+ # ###############################
4150FROM --platform=$BUILDPLATFORM itkdev/php8.4-fpm:alpine
4251LABEL maintainer="ITK Dev <itkdev@mkb.aarhus.dk>"
4352
0 commit comments