-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (27 loc) · 832 Bytes
/
Dockerfile
File metadata and controls
36 lines (27 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM node:24 AS builder
ARG CI_COMMIT_SHORT_SHA
ARG ENVIRONMENT
LABEL git-commit=$CI_COMMIT_SHORT_SHA
WORKDIR /build
COPY ./ ./
RUN node -v
RUN yarn -v
RUN node ./scripts/generateBuildId.js $CI_COMMIT_SHORT_SHA
RUN yarn install
RUN yarn check
RUN yarn workspaces focus @untendurch/frontend
RUN yarn workspace @untendurch/frontend run build:$ENVIRONMENT
RUN yarn workspaces focus @untendurch/backend
RUN yarn workspace @untendurch/backend run build
RUN cp -pr ./packages/frontend/dist/* ./packages/backend/public/
RUN yarn workspaces focus @untendurch/backend --production
#RUN rm -rf .git && rm -rf *.lock
FROM node:24-slim AS runner
ARG CI_COMMIT_SHORT_SHA
ARG ENVIRONMENT
LABEL git-commit=$CI_COMMIT_SHORT_SHA
WORKDIR /
COPY --from=builder /build/ /app
WORKDIR /app/packages/backend
CMD node ./dist/server.js
EXPOSE 8080