v1.2.16: das Web-Image baut wieder, und ein MR-Check dafuer
web/Dockerfile kopierte nur frontend/, aber frontend/src importiert den Coach-Kern aus api/coach/core (../../../api/coach/core/*). Der Build-Stage liegt jetzt unter /app/frontend und bekommt api/coach/core an derselben relativen Stelle wie im Repo. Neuer Job build:web-check baut das Web-Image in jeder MR-Pipeline, die frontend/, web/ oder den Kern anfasst (der API-Check gab es schon, den Web-Check nicht — deshalb ist v1.2.15 durchgerutscht). Auf der VM gebaut und geprueft: App-Shell 200, Coach im Bundle.
This commit is contained in:
1 parent
6c4af7d5fc
commit
f190f0ba4a
10 files changed
+68
-12
No files matched your search
+7
-2
@@ -8,9 +8,14 @@
|
||||
# specific native binaries, which is what breaks `vite build` with unrelated-looking
|
||||
# module-resolution errors.
|
||||
FROM --platform=$BUILDPLATFORM node:22-alpine AS build
|
||||
WORKDIR /app
|
||||
# The frontend sits at /app/frontend, not /app: the Coach's runtime-neutral core lives in
|
||||
# api/coach/core and is imported from frontend/src as ../../../api/coach/core/*, so the two
|
||||
# have to keep the same relative position they have in the repository. Copying frontend/ alone
|
||||
# is exactly what made the v1.2.15 web image fail to build.
|
||||
WORKDIR /app/frontend
|
||||
COPY frontend/package.json frontend/package-lock.json* ./
|
||||
RUN npm ci 2>/dev/null || npm install
|
||||
COPY api/coach/core/ /app/api/coach/core/
|
||||
COPY frontend/ ./
|
||||
RUN npm run build
|
||||
|
||||
@@ -31,7 +36,7 @@ LABEL maintainer="Duarte Santos https://gitlab.com/DuarteSantos8" \
|
||||
org.opencontainers.image.created=$BUILD_DATE
|
||||
|
||||
COPY web/nginx.conf.template /etc/nginx/templates/default.conf.template
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
COPY --from=build /app/frontend/dist /usr/share/nginx/html
|
||||
# exercise media (img/gif) is mounted at runtime from the media volume
|
||||
|
||||
# Set Default ENVs for nginx
|
||||
|
||||
Reference in new issue
Block a user