-
Notifications
You must be signed in to change notification settings - Fork 127
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
Showing
2 changed files
with
10 additions
and
18 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 |
---|---|---|
@@ -1,20 +1,12 @@ | ||
FROM node:gallium-alpine | ||
|
||
COPY . /origin | ||
|
||
WORKDIR /origin | ||
|
||
RUN npm ci && \ | ||
npm run build && \ | ||
npm prune --production && \ | ||
cp -r dist /app && \ | ||
cp -r node_modules /app/node_modules && \ | ||
rm -rf /origin | ||
|
||
FROM node:hydrogen-alpine AS builder | ||
COPY . /app | ||
WORKDIR /app | ||
RUN npm ci && npm run build | ||
|
||
FROM node:hydrogen-alpine | ||
COPY --from=builder /app/dist /app | ||
COPY package*.json /app/ | ||
WORKDIR /app | ||
RUN npm ci --omit=dev | ||
EXPOSE 5000 | ||
|
||
USER daemon | ||
|
||
CMD ["node", "main.js"] | ||
ENTRYPOINT ["node", "src/main.js"] |
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,4 +1,4 @@ | ||
FROM node:gallium-alpine | ||
FROM node:hydrogen-alpine | ||
COPY . /app | ||
WORKDIR /app | ||
RUN npm ci | ||
|