Skip to content
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

Dockerfile 配置文件 #2

Open
liwan11123123 opened this issue Jun 12, 2019 · 0 comments
Open

Dockerfile 配置文件 #2

liwan11123123 opened this issue Jun 12, 2019 · 0 comments

Comments

@liwan11123123
Copy link
Owner

# Stage 0, "build-stage", based on Node.js, to build and compile the frontend
FROM node:8.12 as build-stage
WORKDIR /app
COPY package.json /app/
RUN npm install
COPY ./ /app/
RUN npm run build:qa --production

# Stage 1, based on Nginx, to have only the compiled app, ready for production with Nginx
FROM nginx:1.15.4
COPY --from=build-stage /app/dist/qa/ /usr/share/nginx/html
# Copy the default nginx.conf provided by tiangolo/node-frontend
COPY --from=build-stage /app/_nginx/kaixinliao.conf /etc/nginx/conf.d/default.conf
COPY --from=build-stage /app/_nginx/nginx.conf /etc/nginx/nginx.conf



# # STEP 2: Setup
# FROM nginx:1.13.5-alpine

# COPY --from=builder /sealtalk/_nginx/default.conf /etc/nginx/conf.d/default.conf
# COPY --from=builder /sealtalk/_nginx/ssl/* /etc/nginx/ssl/

# RUN rm -rf /usr/share/nginx/html/*

# COPY --from=builder /sealtalk/out /usr/share/nginx/html

# CMD [ "nginx", "-g", "daemon off;"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant