generated from digitalcredentials/isomorphic-lib-template
-
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.
- Loading branch information
1 parent
aec9e61
commit 1ca631f
Showing
2 changed files
with
21 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM node:18 as builder | ||
ADD . /app | ||
ENV NODE_ENV=production | ||
WORKDIR /app | ||
RUN npm install | ||
|
||
FROM gcr.io/distroless/nodejs18-debian11 | ||
COPY --from=builder /app/node_modules /app/node_modules | ||
COPY --from=builder /app/server.js /app/server.js | ||
COPY --from=builder /app/src /app/src | ||
COPY --from=builder /app/package.json /app/package.json | ||
COPY --from=builder /app/healthcheck.js /app/healthcheck.js | ||
|
||
# The healthcheck can be run from here, but also from the compose file | ||
# HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD ["/nodejs/bin/node", "app/healthcheck.js"] | ||
|
||
CMD ["app/server.js"] | ||
|
||
EXPOSE 4009 | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
FROM node:20 | ||
WORKDIR /app | ||
COPY . . | ||
RUN npm install | ||
#RUN npm install | ||
CMD ["node", "server.js"] | ||
EXPOSE 4009 |