diff --git a/deploy_k8s/admin_cms/admin_cms.Dockerfile b/deploy_k8s/admin_cms/admin_cms.Dockerfile index 1144ef09d..a7b33da70 100644 --- a/deploy_k8s/admin_cms/admin_cms.Dockerfile +++ b/deploy_k8s/admin_cms/admin_cms.Dockerfile @@ -2,6 +2,7 @@ FROM ubuntu # 设置固定的项目路径 ENV WORKDIR /Open-IM-Server +ENV CMDDIR $WORKDIR/cmd ENV CONFIG_NAME $WORKDIR/config/config.yaml @@ -15,5 +16,5 @@ RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/script && \ VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config", "/Open-IM-Server/script"] -WORKDIR $WORKDIR -CMD ./cmd/main +WORKDIR $CMDDIR +CMD ./main diff --git a/deploy_k8s/api/api.Dockerfile b/deploy_k8s/api/api.Dockerfile index f1dd4c748..644621d5f 100644 --- a/deploy_k8s/api/api.Dockerfile +++ b/deploy_k8s/api/api.Dockerfile @@ -2,6 +2,7 @@ FROM ubuntu # 设置固定的项目路径 ENV WORKDIR /Open-IM-Server +ENV CMDDIR $WORKDIR/cmd ENV CONFIG_NAME $WORKDIR/config/config.yaml # 将可执行文件复制到目标目录 @@ -14,5 +15,5 @@ RUN mkdir $WORKDIR/logs $WORKDIR/config $WORKDIR/script && \ VOLUME ["/Open-IM-Server/logs","/Open-IM-Server/config","/Open-IM-Server/script"] -WORKDIR $WORKDIR -CMD ./cmd/main +WORKDIR $CMDDIR +CMD ./main diff --git a/deploy_k8s/api/deployment.yaml b/deploy_k8s/api/deployment.yaml index 52990ca2f..ee9d0c8a7 100644 --- a/deploy_k8s/api/deployment.yaml +++ b/deploy_k8s/api/deployment.yaml @@ -16,7 +16,7 @@ spec: containers: - name: api image: openim/api:v2.0.10k - # imagePullPolicy: Always + imagePullPolicy: Always ports: - containerPort: 10002 volumeMounts: @@ -42,3 +42,4 @@ spec: targetPort: 10002 selector: app: api + type: NodePort \ No newline at end of file diff --git a/deploy_k8s/cms_api/deployment.yaml b/deploy_k8s/cms_api/deployment.yaml index 4dd0626ac..9f66431d2 100644 --- a/deploy_k8s/cms_api/deployment.yaml +++ b/deploy_k8s/cms_api/deployment.yaml @@ -41,4 +41,5 @@ spec: port: 10006 targetPort: 10006 selector: - app: cms-api \ No newline at end of file + app: cms-api + type: NodePort \ No newline at end of file diff --git a/deploy_k8s/demo/deployment.yaml b/deploy_k8s/demo/deployment.yaml index d12f902b9..228cc8278 100644 --- a/deploy_k8s/demo/deployment.yaml +++ b/deploy_k8s/demo/deployment.yaml @@ -41,4 +41,5 @@ spec: port: 10004 targetPort: 10004 selector: - app: demo \ No newline at end of file + app: demo + type: NodePort \ No newline at end of file diff --git a/deploy_k8s/ingress.yaml b/deploy_k8s/ingress.yaml index f2d247d0f..6d7fbda6d 100644 --- a/deploy_k8s/ingress.yaml +++ b/deploy_k8s/ingress.yaml @@ -77,7 +77,7 @@ spec: service: name: demo port: - number: 10004 + number: 10004 path: / pathType: Prefix --- diff --git a/deploy_k8s/msg_gateway/deployment.yaml b/deploy_k8s/msg_gateway/deployment.yaml index 0eec0f5f5..72352386e 100644 --- a/deploy_k8s/msg_gateway/deployment.yaml +++ b/deploy_k8s/msg_gateway/deployment.yaml @@ -45,5 +45,6 @@ spec: targetPort: ws-port selector: app: msg-gateway + type: NodePort \ No newline at end of file diff --git a/deploy_k8s/sdk_server/deployment.yaml b/deploy_k8s/sdk_server/deployment.yaml index 57cb0c412..063b3d9d9 100644 --- a/deploy_k8s/sdk_server/deployment.yaml +++ b/deploy_k8s/sdk_server/deployment.yaml @@ -49,5 +49,6 @@ spec: targetPort: 10003 selector: app: sdk-server + type: NodePort \ No newline at end of file