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