Commit f15399c5 by Lyan
parents 4174a690 6b37eb70
FROM nginx
#RUN rm -rf /usr/share/nginx/html/*
RUN rm -rf /etc/nginx/conf.d/*
#COPY dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/
COPY docker-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["sh","/usr/local/bin/docker-entrypoint.sh"]
# build stage
FROM node:12-alpine as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass -g && npm config set registry https://registry.npm.taobao.org
RUN npm install
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 80
CMD ["nginx", "-g", "daemon off;"]
......@@ -13,7 +13,7 @@ gzip_disable "MSIE [1-6]\.";
server {
listen 8080;
server_name 81.68.189.225;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment