Browse Source

project: edit dockerfile

Yi 1 year ago
parent
commit
21f79bae14
2 changed files with 4 additions and 1 deletions
  1. 3 0
      Dockerfile
  2. 1 1
      src/utils/configs.js

+ 3 - 0
Dockerfile

@@ -3,8 +3,11 @@ WORKDIR /app/tmr-group-admin
 #拷贝源码
 COPY . .
 
+ENV HOSTIP = 'http://127.0.0.1:8081/'
+
 CMD sed -i "s/SERVER_URL/$hostip/g" ./src/utils/config.js
 
+RUN cat ./src/utils/config.js
 #安装依赖
 RUN npm install --registry=https://registry.npm.taobao.org
 

+ 1 - 1
src/utils/configs.js

@@ -57,5 +57,5 @@ export const dataType = [
   { name: 'integer', needQuotation: false, availableFunc: ['sum', 'avg', 'max', 'min', 'count', 'none', 'custbiaozhun', 'custbianyi'] }
 ]
 
-export const SERVER_URL = 'http://127.0.0.1:8081';
+export const SERVER_URL = 'SERVER_URL';
 // export const SERVER_URL = 'http://192.168.1.70:8081/';