Skip to content

Edited Dockerfile of Docker(Nginx) deployment doc #4561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 21, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions docs/guide/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,14 +395,16 @@ Deploy your application using nginx inside of a docker container.
2. Create a `Dockerfile` file in the root of your project.

```Dockerfile
FROM node:10
COPY ./ /app
FROM node:10 as build-stage
WORKDIR /app
RUN npm install && npm run build
COPY package*.json ./
RUN npm install
COPY ./ .
RUN npm run build

FROM nginx
FROM nginx as production-stage
RUN mkdir /app
COPY --from=0 /app/dist /app
COPY --from=build-stage /app/dist /app
COPY nginx.conf /etc/nginx/nginx.conf
```

Expand Down