forked from safe-global/safe-events-service
-
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.
* Add docker build to Github actions task * Add support for releases
- Loading branch information
Showing
3 changed files
with
69 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Dockerfile | ||
.dockerignore | ||
node_modules | ||
dist |
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,21 @@ | ||
# | ||
# BUILD CONTAINER | ||
# | ||
FROM node:18 as base | ||
USER node | ||
WORKDIR /app | ||
COPY --chown=node:node package*.json tsconfig*.json ./ | ||
RUN npm install | ||
COPY --chown=node:node . . | ||
ENV NODE_ENV production | ||
RUN npm run build | ||
|
||
# | ||
# PRODUCTION CONTAINER | ||
# | ||
ENV NODE_ENV production | ||
FROM node:18 as production | ||
USER node | ||
COPY --chown=node:node --from=base /app/node_modules ./node_modules | ||
COPY --chown=node:node --from=base /app/dist ./dist | ||
CMD [ "node", "dist/main.js" ] |