@@ -44,8 +44,16 @@ trap cleanup EXIT
4444echo " ==> Clearing any stale stack…"
4545docker compose down -v > /dev/null 2>&1 || true
4646
47- echo " ==> Bringing up the server stack…"
48- docker compose up -d --build --wait postgres rustfs kafka server
47+ echo " ==> Bringing up infrastructure…"
48+ # Start infrastructure services first. Notably, we avoid the scraper
49+ # service because it's unnecessary for the test. Also, in CI's dind environment
50+ # the scraper cannot start because its nftables egress firewall requires
51+ # CAP_NET_ADMIN, and an exited dependency container causes compose v2 to
52+ # return a non-zero exit code, aborting the script.
53+ docker compose up -d --build --wait postgres rustfs kafka
54+
55+ echo " ==> Creating object-store bucket…"
56+ docker compose run --rm rustfs-init
4957
5058if [[ " ${CI:- } " == " true" ]]; then
5159 echo " ==> Joining the job container to the stack network ($NETWORK )…"
@@ -60,6 +68,12 @@ if [[ "${CI:-}" == "true" ]]; then
6068 export POLYCENTRIC_TEST_KAFKA_BROKERS=" kafka:19092"
6169fi
6270
71+ echo " ==> Building and starting the server…"
72+ # Build and start the server without its depends_on chain (--no-deps), so
73+ # the scraper container is not pulled in. The infrastructure is already
74+ # running, so this is safe.
75+ docker compose up -d --no-deps --build --wait server
76+
6377echo " ==> Waiting for the server gRPC port ($SERVER_HOST :$SERVER_PORT )…"
6478for _ in $( seq 1 60) ; do
6579 if (exec 3<> " /dev/tcp/$SERVER_HOST /$SERVER_PORT " ) 2> /dev/null; then
0 commit comments