Skip to content

Commit 1d7e506

Browse files
committed
fix docker compose usage
Signed-off-by: jaogoy <jaogoy@gmail.com>
1 parent 728cb27 commit 1d7e506

File tree

1 file changed

+29
-6
lines changed

1 file changed

+29
-6
lines changed

tests/core/engine_adapter/integration/docker/compose.starrocks.yaml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,48 @@ services:
33
image: starrocks/fe-ubuntu:3.5-latest
44
container_name: starrocks-fe
55
hostname: starrocks-fe
6-
environment:
7-
- FE_SERVERS=fe1:starrocks-fe:9030
6+
command: |
7+
bash /opt/starrocks/fe/bin/start_fe.sh --host_type FQDN
88
ports:
9-
- "9030:9030" # MySQL protocol port for tests
10-
- "8030:8030" # HTTP port
9+
- 9030:9030 # MySQL protocol port for tests
10+
- 9020:9020
11+
- 8030:8030 # HTTP port
1112
networks:
1213
- starrocks_net
14+
healthcheck:
15+
test: 'mysql -u root -h starrocks-fe -P 9030 -e "SHOW FRONTENDS\G" |grep "Alive: true"'
16+
interval: 10s
17+
timeout: 5s
18+
retries: 3
1319

1420
starrocks-be:
1521
image: starrocks/be-ubuntu:3.5-latest
1622
container_name: starrocks-be
1723
hostname: starrocks-be
1824
depends_on:
19-
- starrocks-fe
25+
starrocks-fe:
26+
condition: service_healthy
27+
command:
28+
- /bin/bash
29+
- -c
30+
- |
31+
ulimit -n 65535;
32+
sleep 15s
33+
mysql --connect-timeout 2 -h starrocks-fe -P 9030 -u root -e "ALTER SYSTEM ADD BACKEND \"starrocks-be:9050\";"
34+
bash /opt/starrocks/be/bin/start_be.sh
2035
environment:
21-
- FE_SERVERS=starrocks-fe:9030
36+
- HOST_TYPE=FQDN
37+
ports:
38+
- 8040:8040
2239
networks:
2340
- starrocks_net
41+
healthcheck:
42+
test: 'mysql -u root -h starrocks-fe -P 9030 -e "SHOW BACKENDS\G" |grep "Alive: true"'
43+
interval: 10s
44+
timeout: 5s
45+
retries: 3
2446

2547
networks:
2648
starrocks_net:
2749
driver: bridge
50+

0 commit comments

Comments
 (0)