generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into report-routes
- Loading branch information
Showing
7 changed files
with
349 additions
and
21,559 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# RedHat UBI 8 with nodejs 16 | ||
FROM registry.access.redhat.com/ubi8/ubi as builder | ||
|
||
RUN dnf module enable -y nodejs:16 && dnf install -y nodejs | ||
|
||
# Install packages, build and keep only prod packages | ||
WORKDIR /app | ||
COPY . ./ | ||
RUN npm ci --only=prod && \ | ||
npm run build | ||
|
||
# Deployment container | ||
FROM registry.access.redhat.com/ubi8/ubi-micro | ||
|
||
# Set node to production | ||
ENV NODE_ENV production | ||
|
||
# Node packages and dependencies | ||
COPY --from=builder /usr/bin/node /usr/bin/ | ||
COPY --from=builder /usr/lib64/libz.so.1 /usr/lib64/ | ||
COPY --from=builder /usr/lib64/libbrotlidec.so.1 /usr/lib64/ | ||
COPY --from=builder /usr/lib64/libbrotlienc.so.1 /usr/lib64/ | ||
COPY --from=builder /usr/lib64/libcrypto.so.1.1 /usr/lib64/ | ||
COPY --from=builder /usr/lib64/libssl.so.1.1 /usr/lib64/ | ||
COPY --from=builder /usr/lib64/libstdc++.so.6 /usr/lib64/ | ||
COPY --from=builder /usr/lib64/libgcc_s.so.1 /usr/lib64/ | ||
COPY --from=builder /usr/lib64/libbrotlicommon.so.1 /usr/lib64/ | ||
|
||
# Copy over app | ||
WORKDIR /app | ||
COPY --from=builder /app/node_modules ./node_modules | ||
COPY --from=builder /app/build ./dist | ||
|
||
# Expose port - mostly a convention, for readability | ||
EXPOSE 3000 | ||
|
||
# Start up command | ||
ENTRYPOINT ["node", "dist/src/main"] |
Oops, something went wrong.