-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 changed file
with
20 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,20 @@ | ||
FROM node:lts-alpine as build-stage | ||
|
||
# make the 'app' folder the current working directory | ||
WORKDIR /app | ||
|
||
# copy both 'package.json' and 'package-lock.json' (if available) | ||
COPY package*.json ./ | ||
|
||
# install project dependencies | ||
RUN npm install | ||
|
||
# copy project files and folders to the current working directory (i.e. 'app' folder) | ||
COPY . . | ||
RUN npm run build | ||
|
||
# production stage | ||
FROM nginx:stable-alpine as production-stage | ||
COPY --from=build-stage /app/dist /usr/share/nginx/html | ||
EXPOSE 8093 | ||
CMD ["nginx", "-g", "daemon off;"] |