-
Notifications
You must be signed in to change notification settings - Fork 382
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
f1228a7
commit 2b92e07
Showing
3 changed files
with
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.github/ | ||
node_modules/ | ||
.env |
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,36 @@ | ||
############# | ||
# Should be the specific version of node:alpine3. | ||
FROM node:14.15.5-buster@sha256:28b64286eb60f8b14112c9d3900a826743796b0efe04344c8a25371d56ac6b86 AS development | ||
|
||
WORKDIR /srv/app/ | ||
|
||
COPY ./package.json ./package-lock.json ./ | ||
|
||
RUN npm install | ||
|
||
COPY ./ ./ | ||
|
||
|
||
######################## | ||
# Should be the specific version of node:alpine3. | ||
FROM node:14.15.5-buster@sha256:28b64286eb60f8b14112c9d3900a826743796b0efe04344c8a25371d56ac6b86 AS build | ||
|
||
ENV NODE_ENV=production | ||
|
||
WORKDIR /srv/app/ | ||
|
||
COPY --from=development /srv/app/ ./ | ||
|
||
# Discard devDependencies. | ||
RUN yarn install | ||
|
||
|
||
####################### | ||
# Should be the specific version of node:alpine3. | ||
FROM node:14.15.5-alpine3.13@sha256:17dc61b31b2a12a1390b5a4e2e69b0d0886a0d77647f88c5a33787ac457fa83e AS production | ||
|
||
ENV NODE_ENV=production | ||
|
||
WORKDIR /srv/app/ | ||
|
||
COPY --from=build /srv/app/ ./ |
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