-
Notifications
You must be signed in to change notification settings - Fork 2
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
be73a92
commit 520b82d
Showing
3 changed files
with
32 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# build stage | ||
FROM node:lts-alpine as build-env | ||
ENV NODE_ENV=production | ||
|
||
ADD . /opt/app | ||
WORKDIR /opt/app | ||
|
||
RUN \ | ||
yarn install && \ | ||
yarn build | ||
|
||
FROM node:lts-alpine | ||
WORKDIR /opt/app | ||
COPY --from=build-env /opt/app/build /opt/app/build | ||
|
||
RUN npm install -g serve | ||
|
||
CMD ["serve","-s","build"] |
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,14 @@ | ||
# build stage | ||
FROM node:lts-alpine as build-env | ||
ENV NODE_ENV=production | ||
|
||
ADD . /opt/app | ||
WORKDIR /opt/app | ||
|
||
RUN \ | ||
yarn install && \ | ||
yarn build && npm install -g serve | ||
|
||
CMD ["serve","-s","build"] | ||
|
||
|