Commit ef71b6cab34943efd976ee9f8c9f306d967db628

Authored by zhangdaiscott
1 parent b0a6f36a

单体镜像制作脚本

Showing 1 changed file with 9 additions and 2 deletions
jeecg-boot/docker-compose.yml
@@ -5,6 +5,8 @@ services: @@ -5,6 +5,8 @@ services:
5 context: ./db 5 context: ./db
6 environment: 6 environment:
7 MYSQL_ROOT_PASSWORD: root 7 MYSQL_ROOT_PASSWORD: root
  8 + MYSQL_ROOT_HOST: '%'
  9 + TZ: Asia/Shanghai
8 restart: always 10 restart: always
9 container_name: jeecg-boot-mysql 11 container_name: jeecg-boot-mysql
10 image: jeecg-boot-mysql 12 image: jeecg-boot-mysql
@@ -14,6 +16,7 @@ services: @@ -14,6 +16,7 @@ services:
14 --explicit_defaults_for_timestamp=true 16 --explicit_defaults_for_timestamp=true
15 --lower_case_table_names=1 17 --lower_case_table_names=1
16 --max_allowed_packet=128M 18 --max_allowed_packet=128M
  19 + --default-authentication-plugin=caching_sha2_password
17 ports: 20 ports:
18 - 3306:3306 21 - 3306:3306
19 22
@@ -22,14 +25,18 @@ services: @@ -22,14 +25,18 @@ services:
22 ports: 25 ports:
23 - 6379:6379 26 - 6379:6379
24 restart: always 27 restart: always
  28 + hostname: jeecg-boot-redis
25 container_name: jeecg-boot-redis 29 container_name: jeecg-boot-redis
26 30
27 -  
28 jeecg-boot-system: 31 jeecg-boot-system:
29 build: 32 build:
30 context: ./jeecg-boot-module-system 33 context: ./jeecg-boot-module-system
31 - restart: always 34 + restart: on-failure
  35 + depends_on:
  36 + - jeecg-boot-mysql
  37 + - jeecg-boot-redis
32 container_name: jeecg-boot-system 38 container_name: jeecg-boot-system
33 image: jeecg-boot-system 39 image: jeecg-boot-system
  40 + hostname: jeecg-boot-system
34 ports: 41 ports:
35 - 8080:8080 42 - 8080:8080
36 \ No newline at end of file 43 \ No newline at end of file