Browse Source

修改docker配置

zq940222 2 months ago
parent
commit
dbf790b338
1 changed files with 7 additions and 9 deletions
  1. 7 9
      gateway/Dockerfile

+ 7 - 9
gateway/Dockerfile

@@ -4,16 +4,14 @@ LABEL authors="Jack"
 
 # 创建目标目录
 ENV JAR_FILE=target/wk_gateway-0.0.1-SNAPSHOT.jar
-COPY ${JAR_FILE} app.jar
-# 复制代码
 
-
-# 编译项目
-#RUN mvn clean package -DskipTests
-
-#RUN unzip gateway.zip  && \
-#    cd gateway && sh 72crm.sh start\
+COPY ${JAR_FILE} weichi-crm-gateway.jar
 
 # 暴露微服务的端口
 EXPOSE 8443
-ENTRYPOINT ["java","-jar","/app.jar"]
+
+CMD echo "****** Start... " & \
+    echo "****** 运行命令:nohup java -jar weichi-crm-gateway.jar >> /home/weichi-crm-gateway.log 2>&1 &" & \
+    nohup java -jar weichi-crm-gateway.jar >> /home/weichi-crm-gateway.log 2>&1 & \
+    echo "****** 查看日志..." & \
+    tail -f /home/weichi-crm-gateway.log