-
Notifications
You must be signed in to change notification settings - Fork 0
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
4 changed files
with
25 additions
and
27 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,22 +1,31 @@ | ||
FROM node:dubnium-alpine | ||
FROM node:dubnium-alpine as builder | ||
|
||
# Create app directory | ||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
# Binary dependency | ||
RUN apk --no-cache add openssl | ||
|
||
# Install app dependencies | ||
COPY package.json npm-shrinkwrap.json /usr/src/app/ | ||
RUN npm install --quiet | ||
|
||
# Bundle app source | ||
COPY . /usr/src/app | ||
|
||
# Build front-end | ||
RUN npm run build | ||
|
||
# Run app | ||
EXPOSE 3000 | ||
CMD ["npm", "run", "dev"] | ||
|
||
FROM node:dubnium-alpine | ||
|
||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
RUN apk --no-cache add openssl | ||
|
||
COPY package.json npm-shrinkwrap.json /usr/src/app/ | ||
RUN npm install --quiet --only=production | ||
|
||
COPY . /usr/src/app | ||
COPY --from=builder /usr/src/app/dist ./dist | ||
|
||
EXPOSE 3000 | ||
CMD ["npm", "start"] |
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
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