From 84a6e286774a732ea9495897178996e5cfc6dd05 Mon Sep 17 00:00:00 2001 From: zhangdaiscott Date: Tue, 9 Mar 2021 11:34:11 +0800 Subject: [PATCH] =?UTF-8?q?nacos=20server=E6=9C=AC=E5=9C=B0=E5=8C=96?= =?UTF-8?q?=E9=87=87=E7=94=A8jar=E6=96=B9=E5=BC=8F=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=EF=BC=8C=E7=AE=80=E5=8C=96=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jeecg-cloud-module/docker-compose.yml | 22 +++++-------------- .../jeecg-cloud-nacos/Dockerfile | 2 +- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/jeecg-boot/jeecg-cloud-module/docker-compose.yml b/jeecg-boot/jeecg-cloud-module/docker-compose.yml index f3d73cf..125501d 100644 --- a/jeecg-boot/jeecg-cloud-module/docker-compose.yml +++ b/jeecg-boot/jeecg-cloud-module/docker-compose.yml @@ -28,28 +28,18 @@ services: hostname: jeecg-boot-redis jeecg-boot-nacos: - restart: always - image: nacos/nacos-server:1.4.0 - container_name: jeecg-boot-nacos - hostname: jeecg-boot-nacos + restart: on-failure + build: + context: ./jeecg-cloud-nacos ports: - 8848:8848 depends_on: - jeecg-boot-mysql -# volumes: -# - ./init/docker-startup.sh:/home/nacos/bin/docker-startup.sh -# - ./init/application.properties:/home/nacos/conf/application.properties - environment: - MODE: standalone - PREFER_HOST_MODE: hostname - SPRING_DATASOURCE_PLATFORM: mysql - MYSQL_SERVICE_HOST: jeecg-boot-mysql - MYSQL_SERVICE_PORT: 3306 - MYSQL_SERVICE_USER: root - MYSQL_SERVICE_PASSWORD: root - MYSQL_SERVICE_DB_NAME: nacos + container_name: jeecg-boot-nacos + hostname: jeecg-boot-nacos jeecg-boot-gateway: + restart: on-failure build: context: ./jeecg-cloud-gateway ports: diff --git a/jeecg-boot/jeecg-cloud-module/jeecg-cloud-nacos/Dockerfile b/jeecg-boot/jeecg-cloud-module/jeecg-cloud-nacos/Dockerfile index cafe3d5..df876e1 100644 --- a/jeecg-boot/jeecg-cloud-module/jeecg-cloud-nacos/Dockerfile +++ b/jeecg-boot/jeecg-cloud-module/jeecg-cloud-nacos/Dockerfile @@ -12,4 +12,4 @@ EXPOSE 8848 ADD ./target/jeecg-cloud-nacos-2.4.2.jar ./ -CMD sleep 50;java -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jeecg-cloud-nacos-2.4.2.jar \ No newline at end of file +CMD sleep 5;java -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jeecg-cloud-nacos-2.4.2.jar \ No newline at end of file -- GitLab