-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts commit 78fd1c6.
- Loading branch information
Showing
6 changed files
with
304 additions
and
0 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
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,29 @@ | ||
FROM node:lts-alpine@sha256:1a9a71ea86aad332aa7740316d4111ee1bd4e890df47d3b5eff3e5bded3b3d10 as build-container | ||
|
||
WORKDIR "/app" | ||
|
||
COPY package*.json "/app/" | ||
RUN npm ci | ||
|
||
COPY . "/app/" | ||
RUN npm run build && \ | ||
rm -rf ./.github ./src ./test ./node_modules | ||
|
||
|
||
FROM node:lts-alpine@sha256:1a9a71ea86aad332aa7740316d4111ee1bd4e890df47d3b5eff3e5bded3b3d10 | ||
ARG NODE_ENV=production | ||
ENV NODE_ENV=$NODE_ENV | ||
WORKDIR "/app" | ||
|
||
RUN apk add --no-cache --update dumb-init && \ | ||
ln -s /app/dist/bin/start.js /usr/local/bin/start && \ | ||
ln -s /app/dist/bin/cli.js /usr/local/bin/cli | ||
|
||
COPY --from=build-container /app/package*.json "/app/" | ||
RUN npm ci --only-production | ||
|
||
COPY --from=build-container "/app" "/app" | ||
USER node | ||
|
||
ENTRYPOINT ["/usr/bin/dumb-init", "--"] | ||
CMD ["/usr/local/bin/start"] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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