Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(ci): pin the compose project in ci-wait-for-docker (#120803)

Charles Viene41222dc9c95
diff --git a/bin/ci-wait-for-docker b/bin/ci-wait-for-docker
index b652f1b35a20..00924a8a22e2 100755
--- a/bin/ci-wait-for-docker
+++ b/bin/ci-wait-for-docker
@@ -16,6 +16,11 @@ set -euo pipefail
SCRIPT_DIR="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd)"
REPO_ROOT="$(dirname "$SCRIPT_DIR")"
DEFAULT_COMPOSE_FILE="${REPO_ROOT}/docker-compose.dev.yml"
+PROJECT="${COMPOSE_PROJECT_NAME:-posthog}"
+# Later steps that run docker compose directly then target this project, not one named after the checkout folder.
+if [ -n "${GITHUB_ENV:-}" ]; then
+ echo "COMPOSE_PROJECT_NAME=${PROJECT}" >> "$GITHUB_ENV"
+fi
WAIT_RETRIES="${WAIT_FOR_DOCKER_RETRIES:-1}"
WAIT_RETRY_TIMEOUT="${WAIT_FOR_DOCKER_RETRY_TIMEOUT:-120}"
COMPOSE_WAIT_TIMEOUT="${WAIT_FOR_COMPOSE_TIMEOUT:-600}"
@@ -58,9 +63,9 @@ compose() {
compose_args+=(-f "$compose_file")
fi
done
- env -u COMPOSE_FILE docker compose "${compose_args[@]}" "$@"
+ env -u COMPOSE_FILE docker compose -p "$PROJECT" "${compose_args[@]}" "$@"
else
- docker compose -f "$DEFAULT_COMPOSE_FILE" "$@"
+ docker compose -p "$PROJECT" -f "$DEFAULT_COMPOSE_FILE" "$@"
fi
}