Skip to content

Commit

Permalink
Update Dockerfile for QA environment
Browse files Browse the repository at this point in the history
  • Loading branch information
ommann committed Aug 22, 2024
1 parent c255633 commit 9687857
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions openshift/rahti2/qa/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,30 @@
# :license: MIT

# Stage 1: Build Angular application
FROM image-registry.openshift-image-registry.svc:5000/researchfi-qa/node:14.15.0-alpine as builder
FROM image-registry.openshift-image-registry.svc:5000/researchfi-devel/node:18.20.3-alpine as builder
COPY . /app
WORKDIR /app
RUN chown -R node:node /app
USER node
RUN npm install
RUN npm ci
RUN npm run build:ssr

# Stage 2: Serve Angular application
FROM image-registry.openshift-image-registry.svc:5000/researchfi-qa/node:14.15.0-alpine as angular
FROM image-registry.openshift-image-registry.svc:5000/researchfi-devel/node:18.20.3-alpine as angular
COPY --from=builder /app/dist/ /dist/
### NOTE: Copying of style file leads into increased TTFB value and therefore poor performance
### Do not use this file copy method.
## SSR build warns from non existent stylesheet in 'browser/'
# ## Manually copy this file from localized build to suppress this warning
# COPY --from=builder /app/dist/browser/fi/*.css /dist/browser/

# Copy dependencies
COPY --from=builder /app/node_modules/ /node_modules/

WORKDIR /

RUN chown -R node:node /dist
USER node

EXPOSE 8080
CMD node dist/server.js
CMD node dist/research-fi/proxy-server.mjs

0 comments on commit 9687857

Please sign in to comment.