Doris2.1.7单机部署-dockercompose
# Doris2.1.7单机部署-dockercompose
# 在宿主机(物理机/虚拟机)执行
sudo sysctl -w vm.max_map_count=2000000
sudo swapoff -a
1
2
3
4
2
3
4
docker-compose.yaml
services:
fe:
image: apache/doris:fe-ubuntu-2.1.7
container_name: doris-fe
hostname: fe
environment:
- FE_SERVERS=fe1:172.30.0.2:9010
- MASTER_FE_IP=172.30.0.2
- FE_ID=1
ports:
- "8030:8030" # FE HTTP端口
- "9020:9020" # FE BRPC端口
- "9030:9030" # MySQL协议端口
- "9010:9010" # FE thrift端口
volumes:
- /home/doris/fe/doris-meta:/opt/apache-doris/fe/doris-meta # 元数据持久化
- /home/doris/fe/log:/opt/apache-doris/fe/log # 日志持久化
networks:
doris-net:
ipv4_address: 172.30.0.2
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8030/api/health"]
interval: 30s
timeout: 10s
retries: 5
be:
image: apache/doris:be-ubuntu-2.1.7
container_name: doris-be
hostname: be
environment:
- FE_SERVERS=fe1:172.30.0.2:9010
- MASTER_FE_IP=172.30.0.2
- BE_ADDR=172.30.0.3:9050
- BE_HEARTBEAT_PORT=9050
- CURRENT_BE_IP=172.30.0.3
- CURRENT_BE_PORT=9050
ports:
- "8040:8040" # 心跳服务端口
- "9050:9050" # BE thrift端口
- "9060:9060" # BE BRPC端口
- "8060:8060" # BE HTTP端口
volumes:
- /home/doris/be/storage:/opt/apache-doris/be/storage # 数据存储持久化
- /home/doris/be/log:/opt/apache-doris/be/log # 日志持久化
networks:
doris-net:
ipv4_address: 172.30.0.3
depends_on:
fe:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8060/api/health"]
interval: 30s
timeout: 10s
retries: 5
networks:
doris-net:
driver: bridge
ipam:
config:
- subnet: 172.30.0.0/24
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
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
docker compose up -d