Browse Source

fix: 调整构建脚本

master
niushuai233 2 years ago
parent
commit
a9231593e3
  1. 3
      .drone.yml
  2. 4
      Dockerfile

3
.drone.yml

@ -41,6 +41,9 @@ steps: @@ -41,6 +41,9 @@ steps:
path: /drone/src/node_modules
commands:
- echo 'node package start'
- pwd
- ls -alh
- ls -alh node_modules
# 打包
- npm config set cache /node_cache --global
- npm run pre

4
Dockerfile

@ -4,12 +4,10 @@ FROM nginx:1.23 @@ -4,12 +4,10 @@ FROM nginx:1.23
MAINTAINER shuai.niu@foxmail.com
# 设置环境变量
ENV DEV_API_URL http://localhost:8080
ENV TEST_API_URL http://localhost:8080
ENV PROD_API_URL http://localhost:8080
# 拷贝前端工程文件
ADD dist/ /var/www/html/
ADD dist/ /usr/share/nginx/html/
# 拷贝镜像启动程序
ADD entry-point.sh /entry-point.sh

Loading…
Cancel
Save