Browse Source

add txtest.ini

Zhang Li 2 years ago
parent
commit
7263da22be
4 changed files with 32 additions and 1 deletions
  1. 2 0
      .env.txtest
  2. 24 0
      Dockerfile.txtest
  3. 5 1
      Makefile
  4. 1 0
      package.json

+ 2 - 0
.env.txtest

@@ -0,0 +1,2 @@
+REACT_APP_BASE_URL = 'http://aihub-dag-test.digitalyili.com/'
+REACT_APP_JPT = 'http://aihub-dag-jpt-test.digitalyili.com'

+ 24 - 0
Dockerfile.txtest

@@ -0,0 +1,24 @@
+FROM node:14-buster as build
+WORKDIR /workspace
+COPY package.json .
+RUN npm install
+ADD . /workspace
+RUN npm run build:txtest
+
+
+FROM nginx:mainline
+WORKDIR /usr/share/nginx/html
+COPY --from=build /workspace/build /usr/share/nginx/html/dag
+RUN echo "\
+server {\n\
+    listen 80;\n\
+    listen [::]:80;\n\
+\n\
+    root /usr/share/nginx/html/dag;\n\
+    index index.html index.htm;\n\
+\n\
+    location / {\n\
+    try_files \$uri \$uri/ /index.html;\n\
+    }\n\
+}\n\
+" > /etc/nginx/conf.d/default.conf

+ 5 - 1
Makefile

@@ -18,4 +18,8 @@ idctest:
 
 sxkj:
 	@docker build . -t SXKJ:32775/dag-frontend:sxkj -f Dockerfile.sxkj
-	@docker push SXKJ:32775/dag-frontend:sxkj
+	@docker push SXKJ:32775/dag-frontend:sxkj
+
+txtest:
+	@docker build . -t registry.cn-hangzhou.aliyuncs.com/sxtest/dag-frontend:txtest -f Dockerfile.txtest
+	@docker push registry.cn-hangzhou.aliyuncs.com/sxtest/dag-frontend:txtest

+ 1 - 0
package.json

@@ -38,6 +38,7 @@
     "build:prod": "dotenv -e .env.production react-scripts build",
     "build:idctest": "dotenv -e .env.idctest react-scripts build",
     "build:sxkj": "dotenv -e .env.sxkj react-scripts build",
+    "build:txtest": "dotenv -e .env.txtest react-scripts build",
     "test": "react-scripts test",
     "eject": "react-scripts eject"
   },