提交 7cc54084 编写于 作者: JEECG低代码平台's avatar JEECG低代码平台

docker-compose脚本优化,nacos采用mysql方式自动初始化配置

上级 32297110
......@@ -6,6 +6,8 @@ ENV TZ=Asia/Shanghai
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
COPY ./tables_nacos.sql /docker-entrypoint-initdb.d
COPY ./jeecgboot-mysql-5.7.sql /docker-entrypoint-initdb.d
COPY ./tables_xxl_job.sql /docker-entrypoint-initdb.d
\ No newline at end of file
此差异已折叠。
......@@ -29,19 +29,34 @@ services:
jeecg-boot-nacos:
restart: always
image: nacos/nacos-server
image: nacos/nacos-server:1.4.0
container_name: jeecg-boot-nacos
hostname: jeecg-boot-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
jeecg-boot-gateway:
build:
context: ./jeecg-cloud-gateway
ports:
- 9999:9999
depends_on:
- jeecg-boot-nacos
- jeecg-boot-redis
container_name: jeecg-boot-gateway
hostname: jeecg-boot-gateway
......@@ -58,6 +73,14 @@ services:
environment:
- TZ=Asia/Shanghai
# jeecg-boot-xxljob:
# build:
# context: ./jeecg-cloud-xxljob
# ports:
# - 9080:9080
# container_name: jeecg-boot-xxljob
# hostname: jeecg-boot-xxljob
# jeecg-boot-rabbitmq:
# # image: rabbitmq:3-management
# image: rabbitmq:3
......@@ -67,11 +90,3 @@ services:
# restart: always
# container_name: jeecg-boot-rabbitmq
# hostname: jeecg-boot-rabbitmq
# jeecg-boot-xxljob:
# build:
# context: ./jeecg-cloud-xxljob
# ports:
# - 9080:9080
# container_name: jeecg-boot-xxljob
# hostname: jeecg-boot-xxljob
\ No newline at end of file
......@@ -12,4 +12,4 @@ EXPOSE 9999
ADD ./target/jeecg-cloud-gateway-2.4.2.jar ./
CMD java -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jeecg-cloud-gateway-2.4.2.jar
\ No newline at end of file
CMD sleep 10;java -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jeecg-cloud-gateway-2.4.2.jar
\ No newline at end of file
......@@ -12,4 +12,4 @@ EXPOSE 7001
ADD ./target/jeecg-cloud-system-start-2.4.2.jar ./
CMD sleep 60;java -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jeecg-cloud-system-start-2.4.2.jar
\ No newline at end of file
CMD sleep 10;java -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jeecg-cloud-system-start-2.4.2.jar
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册