🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(ci): docker build connect (#12437)
Nimardb51d861840a
diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.ymlindex f43ed7c5a5..0f94d8b7f1 100644--- a/.github/workflows/pipeline.yml+++ b/.github/workflows/pipeline.yml@@ -125,6 +125,8 @@ jobs:needs:- pre-jobif: needs.pre-job.outputs.should_skip != 'true'+ env:+ DOCKER_COMPOSE_FILE: docker-compose.build.ymlsteps:- name: Checkoutuses: actions/checkout@v4@@ -136,32 +138,51 @@ jobs:password: ${{ secrets.DOCKERHUB_TOKEN_READ }}- name: Set NEXT_PUBLIC_BUILD_IDrun: echo "NEXT_PUBLIC_BUILD_ID=$(git rev-parse --short HEAD)" >> $GITHUB_ENV- - name: Build and run both images from compose+ - name: Build imagesrun: |- docker compose --progress plain --verbose -f docker-compose.build.yml build --print > /tmp/bake.json+ docker compose -f "$DOCKER_COMPOSE_FILE" build --print > /tmp/bake.jsondocker buildx bake -f /tmp/bake.json- docker compose --progress plain -f docker-compose.build.yml up -d- - name: Ensure no unhealthy status+ - name: Start compose services and wait for healthchecksrun: |- if docker compose ps | grep "(unhealthy)"; then- echo "One or more services are unhealthy"- exit 1- else- echo "All services are healthy"- fi+ docker compose -f "$DOCKER_COMPOSE_FILE" up -d --wait --wait-timeout 180- name: Check worker healthrun: |- timeout 20 bash -c 'until curl -f http://localhost:3030/api/health; do sleep 2; done'+ curl --retry 10 --retry-delay 2 --retry-all-errors --silent --show-error --fail \+ http://localhost:3030/api/health- name: Check server healthrun: |- timeout 20 bash -c 'until curl -f http://localhost:3000/api/public/health; do sleep 2; done'- - name: Dump docker logs on failure+ curl --retry 10 --retry-delay 2 --retry-all-errors --silent --show-error --fail \+ http://localhost:3000/api/public/health+ - name: Capture docker diagnostics on failureif: failure()run: |- echo "=== langfuse-web logs ==="- docker compose -f docker-compose.build.yml logs langfuse-web --tail=100- echo "=== langfuse-worker logs ==="- docker compose -f docker-compose.build.yml logs langfuse-worker --tail=100+ mkdir -p /tmp/docker-diagnostics++ docker compose -f "$DOCKER_COMPOSE_FILE" ps -a \+ | tee /tmp/docker-diagnostics/compose-state.txt || true++ timeout 15 docker events --since 20m --until "$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \+ | tee /tmp/docker-diagnostics/docker-events.txt || true++ ss -ltnp | tee /tmp/docker-diagnostics/host-listeners.txt || true++ for service in langfuse-web langfuse-worker postgres redis minio clickhouse; do+ container_id="$(docker compose -f "$DOCKER_COMPOSE_FILE" ps -q "$service" || true)"+ if [ -z "$container_id" ]; then+ echo "No container found for ${service}" | tee -a /tmp/docker-diagnostics/missing-containers.txt+ continue+ fi++ docker inspect "$container_id" > "/tmp/docker-diagnostics/${service}-inspect.json" || true+ docker logs --timestamps "$container_id" > "/tmp/docker-diagnostics/${service}-docker-logs.txt" 2>&1 || true+ done+ - name: Upload docker diagnostics+ if: failure()+ uses: actions/upload-artifact@v4+ with:+ name: test-docker-build-diagnostics-${{ github.run_id }}-${{ github.run_attempt }}+ path: /tmp/docker-diagnostics+ if-no-files-found: ignoretests-web:timeout-minutes: 30runs-on: ubuntu-latestdiff --git a/docker-compose.build.yml b/docker-compose.build.ymlindex f76ac30207..2eeaa59ce4 100644--- a/docker-compose.build.yml+++ b/docker-compose.build.yml@@ -17,6 +17,8 @@ services:ports:- "3000:3000"environment: &langfuse-web-env+ # Docker injects HOSTNAME=<container-id>; override it so app servers bind on all interfaces.+ HOSTNAME: 0.0.0.0DATABASE_URL: ${DATABASE_URL:-postgresql://postgres:postgres@postgres:5432/postgres}NEXTAUTH_SECRET: ${NEXTAUTH_SECRET:-mysecret}SALT: ${SALT:-mysalt}@@ -54,7 +56,7 @@ services:REDIS_TLS_KEY: ${REDIS_TLS_KEY:-/certs/redis.key}restart: alwayshealthcheck:- test: ["CMD", "curl", "-f", "http://localhost:3000/api/public/health"]+ test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3000/api/public/health"]interval: 30stimeout: 10sretries: 3@@ -72,7 +74,7 @@ services:<<: *langfuse-web-envrestart: alwayshealthcheck:- test: ["CMD", "curl", "-f", "http://localhost:3030/api/health"]+ test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3030/api/health"]interval: 30stimeout: 10sretries: 3