Browse Source

增加docker文件

yucheng 3 years ago
parent
commit
f6c9800218

+ 1 - 1
docker/dockerfiles/adm-frontend/Dockerfile

@@ -7,7 +7,7 @@ ARG PORT_LOCAL
 
 LABEL tier=frontend
 LABEL product=bdtp
-LABEL project=adm-front
+LABEL project=adm-frontend
 LABEL name=$PROGRAM_ID
 
 #ENV JAVA_OPTS -Dfile.encoding=UTF-8 -Xms300m -Xmx1024m

+ 8 - 8
docker/k8sfiles/adm-frontend.yml

@@ -2,12 +2,12 @@
 apiVersion: v1
 kind: Service
 metadata:
-  name: adm-front
+  name: adm-frontend
   labels:
-    app: adm-front
+    app: adm-frontend
 spec:
   selector:
-    app: adm-front
+    app: adm-frontend
   ports:
     - port: 80
       targetPort: 80
@@ -17,20 +17,20 @@ spec:
 apiVersion: apps/v1
 kind: Deployment
 metadata:
-  name: adm-front
+  name: adm-frontend
 spec:
   replicas: 1
   selector:
     matchLabels:
-      app: adm-front
+      app: adm-frontend
   template:
     metadata:
       labels:
-        app: adm-front
+        app: adm-frontend
     spec:
       containers:
-        - name: adm-front
-          image: labisenlin.persagy.com/library/adm-front:latest
+        - name: adm-frontend
+          image: labisenlin.persagy.com/library/adm-frontend:latest
           imagePullPolicy: Always
           ports:
             - containerPort: 80

+ 4 - 4
docker/k8sfiles/configmap.yml

@@ -2,10 +2,10 @@
 apiVersion: v1
 kind: ConfigMap
 metadata:
-  name: adm-front
+  name: adm-frontend
   namespace: persagy
   labels:
-    name: adm-front
+    name: adm-frontend
 data:
   nginx.conf: |
     #user tony;
@@ -50,7 +50,7 @@ data:
 
             # FMS
             location /admplus {
-                try_files $uri $uri/ /adm-front/index.html;
+                try_files $uri $uri/ /adm-frontend/index.html;
             }
     
             location @rewrites {
@@ -73,7 +73,7 @@ data:
         devServer: {
             proxy: {
                 '/admplus': {
-                    target: 'http://adm-front:8838',
+                    target: 'http://adm-frontend:8838',
                 },
             },
         },