forked from zhoutaoo/SpringCloud
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.config.yml
More file actions
63 lines (61 loc) · 2.03 KB
/
docker-compose.config.yml
File metadata and controls
63 lines (61 loc) · 2.03 KB
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
version: '3'
services:
apollo-portal:
image: idoop/docker-apollo:latest
container_name: sc-apollo-portal-server
restart: always
# portal若出现504错误,则将网络模式改为host. host模式下如果想改端口,参考下方修改端口的环境变量
# Mac和windows暂不支持host模式,请在linux下使用,应用和apollo需要能直接访问
# network_mode: "host"
# 如果需要查看日志,挂载容器中的/opt路径出来即可.
networks:
- sc-net
ports:
- 8070:8070
volumes:
- ./data/config-server/logs:/opt
environment:
# 开启Portal,默认端口: 8070
PORTAL_DB: jdbc:mysql://apollo-db:3306/ApolloPortalDB?characterEncoding=utf8
PORTAL_DB_USER: root
PORTAL_DB_PWD: root123
# 指定远程DEV地址
DEV_URL: http://apollo-config:8080
depends_on:
- apollo-db
- apollo-config
apollo-config:
image: idoop/docker-apollo:latest
container_name: sc-apollo-config-server
restart: always
# portal若出现504错误,则将网络模式改为host. host模式下如果想改端口,参考下方修改端口的环境变量
# Mac和windows暂不支持host模式,请在linux下使用,应用和apollo需要能直接访问
# network_mode: "host"
# 如果需要查看日志,挂载容器中的/opt路径出来即可.
networks:
- sc-net
ports:
- 8080:8080
volumes:
- ./data/config-server/logs:/opt
environment:
# 开启dev环境, 默认端口: config 8080, admin 8090 , 只用开config服务
DEV_DB: jdbc:mysql://apollo-db:3306/ApolloConfigDB?characterEncoding=utf8
DEV_DB_USER: root
DEV_DB_PWD: root123
depends_on:
- apollo-db
apollo-db:
image: mysql:5.7
container_name: sc-apollo-db
restart: always
networks:
- sc-net
ports:
- 3306:3306
volumes:
- ./data/config-server/sql:/docker-entrypoint-initdb.d
- ./data/mysql:/var/lib/mysql
environment:
TZ: Asia/Shanghai
MYSQL_ROOT_PASSWORD: root123