Skip to content

Commit 5cb37d0

Browse files
committed
6601: Ensured built assets in php image
1 parent d61bcee commit 5cb37d0

2 files changed

Lines changed: 17 additions & 7 deletions

File tree

infrastructure/display-api-service/Dockerfile

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
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
35
LABEL maintainer="ITK Dev <itkdev@mkb.aarhus.dk>"
46

57
ARG APP_VERSION="develop"
@@ -20,7 +22,9 @@ COPY assets/ ./assets/
2022
RUN npm run build
2123

2224

23-
######### API backend build ########
25+
################################
26+
# API backend build
27+
################################
2428
FROM --platform=$BUILDPLATFORM itkdev/php8.4-fpm:latest AS api_app_builder
2529
LABEL maintainer="ITK Dev <itkdev@mkb.aarhus.dk>"
2630

@@ -34,10 +38,15 @@ COPY --chown=deploy:deploy . ./
3438
# Composer packages first
3539
RUN 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
3844
RUN rm -rf package* vite.config.js
3945

40-
######## PHP-FPM (API) production image ########
46+
47+
################################
48+
# PHP-FPM (API) production image
49+
################################
4150
FROM --platform=$BUILDPLATFORM itkdev/php8.4-fpm:alpine
4251
LABEL maintainer="ITK Dev <itkdev@mkb.aarhus.dk>"
4352

infrastructure/nginx/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
ARG APP_VERSION="develop"
22
ARG APP_IMAGE="os2display-api-service"
33

4-
FROM --platform=$BUILDPLATFORM ghcr.io/itk-dev/os2display-api-service:${APP_VERSION} AS app
4+
FROM --platform=$BUILDPLATFORM ghcr.io/itk-dev/${APP_IMAGE}:${APP_VERSION} AS app
55

6-
7-
######## Nginx production image ########
6+
################################
7+
# Nginx production image
8+
################################
89
FROM --platform=$BUILDPLATFORM nginxinc/nginx-unprivileged:alpine
910
LABEL maintainer="ITK Dev <itkdev@mkb.aarhus.dk>"
1011

0 commit comments

Comments
 (0)