diff --git a/.drone.yml b/.drone.yml index 6d16b4d..e0e4fd7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,7 +16,10 @@ steps: # - SASS_BINARY_SITE=https://npm.taobao.org/mirrors/node-sass/ npm install node-sass - npm install - npm run build:prod - - cp -r ./dist /home/app/web/dist + + - rm -rf /home/app/web/dist || true # 如果存在就删除(忽略错误) + - mkdir -p /home/app/web/dist + - cp -r ./dist-prod /home/app/web/dist - cp Dockerfile /home/app/web/Dockerfile - cp docker.sh /home/app/web/docker.sh - cp nginx.conf /home/app/web/nginx.conf diff --git a/Dockerfile b/Dockerfile index 2e0f4b7..cbe0d3d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM nginx:latest # 定义作者 MAINTAINER chinasoft # 将dist文件中的内容复制到 /usr/share/nginx/html/ 这个目录下面 -COPY dist/ /usr/share/nginx/html/ +COPY dist/dist-prod /usr/share/nginx/html/ COPY ./nginx.conf /etc/nginx/conf.d/default.conf EXPOSE ${innerPort} ENTRYPOINT nginx -g "daemon off;"