-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.yml
146 lines (136 loc) · 2.99 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
version: "3.9"
services:
mission:
build:
context: ./cloud-mission
dockerfile: Dockerfile-mission
image: cloud-mission:1.0.9
ports:
- "8888:8888"
environment:
- DOCKER_DB=mysql
- DOCKER_NACOS=nacos
- DOCKER_REDIS=redis
- DOCKER_MQ=rabbitmq
depends_on:
- mysql
- nacos
- redis
- rabbitmq
- uaa
restart: always
entrypoint: java -jar /app/cloud-mission.jar
uaa:
build:
context: ./cloud-uaa
dockerfile: Dockerfile-uaa
image: cloud-uaa:1.0.9
ports:
- "8088:8088"
environment:
- DOCKER_DB=mysql
- DOCKER_NACOS=nacos
- DOCKER_REDIS=redis
depends_on:
- mysql
- nacos
- redis
- gateway
restart: always
entrypoint: java -jar /app/cloud-uaa.jar
manage:
build:
context: ./cloud-manage
dockerfile: Dockerfile-manage
image: cloud-manage:1.0.9
ports:
- "8070:8070"
environment:
- DOCKER_DB=mysql
- DOCKER_NACOS=nacos
- DOCKER_REDIS=redis
depends_on:
- mysql
- nacos
- redis
- mission
restart: always
entrypoint: java -jar /app/cloud-manage.jar
gateway:
build:
context: ./cloud-gateway
dockerfile: Dockerfile-gateway
image: cloud-gateway:1.0.9
ports:
- "8205:8205"
environment:
- DOCKER_NACOS=nacos
depends_on:
- nacos
restart: always
entrypoint: java -jar /app/cloud-gateway.jar
monitor:
build:
context: ./cloud-monitor
dockerfile: Dockerfile-monitor
image: cloud-monitor:1.0.9
ports:
- "8890:8890"
environment:
- DOCKER_NACOS=nacos
depends_on:
- gateway
- uaa
- mission
- manage
restart: always
command: ["sh", "-c", "sleep 30 && java -jar /app/cloud-monitor.jar"]
mysql:
image: mysql:8.0
volumes:
- ./sql/init:/docker-entrypoint-initdb.d/
- mysql-data:/var/lib/mysql
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: 123456
TZ: Asia/Shanghai
restart: always
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
redis:
image: redis:7.0
volumes:
- redis-data:/var/lib/redis
ports:
- "6379:6379"
restart: always
nacos:
image: nacos/nacos-server:v2.3.1-slim
ports:
- "8848:8848"
restart: always
environment:
- PREFER_HOST_MODE=hostname
- MODE=standalone
- SPRING_DATASOURCE_PLATFORM=
- MYSQL_SERVICE_HOST=mysql
- MYSQL_SERVICE_DB_NAME=nacos_config
- MYSQL_SERVICE_PORT=3306
- MYSQL_SERVICE_USER=root
- MYSQL_SERVICE_PASSWORD=123456
- MYSQL_SERVICE_DB_PARAM=allowPublicKeyRetrieval=true
depends_on:
- mysql
rabbitmq:
image: rabbitmq:3.11.7
container_name: rabbitmq
restart: always
volumes:
- mq-data:/var/lib/rabbitmq/
ports:
- "5672:5672"
- "15672:15672"
volumes:
mysql-data:
redis-data:
mq-data: