Skip to content

Commit cd18ca6

Browse files
committed
apisix etcd fix
1 parent 501f6ef commit cd18ca6

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

.github/workflows/test-apisix.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,34 +34,28 @@ jobs:
3434
# Clean up any old containers from previous runs
3535
docker rm -f apisix etcd 2>/dev/null || true
3636
37-
# APISIX 3.8.0 (late 2023) + etcd 3.5.10
38-
docker network create apisix-net 2>/dev/null || true
39-
40-
echo "Starting etcd (gcr.io/etcd-development/etcd:v3.5.10)..."
37+
echo "Starting etcd (gcr.io/etcd-development/etcd:v3.5.10) on host network..."
4138
docker run -d --name etcd \
42-
--network apisix-net \
43-
-p 2379:2379 \
39+
--network host \
4440
gcr.io/etcd-development/etcd:v3.5.10 \
4541
/usr/local/bin/etcd \
4642
--name s1 \
4743
--data-dir=/etcd-data \
4844
--listen-client-urls=http://0.0.0.0:2379 \
49-
--advertise-client-urls=http://etcd:2379 \
45+
--advertise-client-urls=http://127.0.0.1:2379 \
5046
--listen-peer-urls=http://0.0.0.0:2380 \
51-
--initial-advertise-peer-urls=http://etcd:2380 \
52-
--initial-cluster=s1=http://etcd:2380 \
47+
--initial-advertise-peer-urls=http://127.0.0.1:2380 \
48+
--initial-cluster=s1=http://127.0.0.1:2380 \
5349
--initial-cluster-state=new
5450
55-
# Give etcd time to start (no etcdctl loop)
51+
# Give etcd time to start
5652
echo "Waiting for etcd to start..."
5753
sleep 25
5854
59-
echo "Starting APISIX..."
55+
echo "Starting APISIX (apache/apisix:3.8.0-debian) on host network..."
6056
docker run -d --name apisix \
61-
--network apisix-net \
62-
-p 9080:9080 -p 9091:9091 -p 9443:9443 -p 9180:9180 \
57+
--network host \
6358
-e APISIX_STAND_ALONE=false \
64-
-e ETCD_HOST="http://etcd:2379" \
6559
apache/apisix:3.8.0-debian
6660
6761
# Wait for APISIX

0 commit comments

Comments
 (0)