@@ -11,7 +11,7 @@ RUN npm install turbo@2.9.12 --global
1111ENV PNPM_HOME="/pnpm"
1212ENV PATH="$PNPM_HOME:$PATH"
1313RUN corepack enable
14- RUN corepack prepare pnpm@10.33.0 --activate
14+ RUN corepack prepare pnpm@11.1.3 --activate
1515
1616FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine AS runtime-base
1717# Remove build-only package managers. npm stays here because the runner stage
@@ -23,22 +23,16 @@ RUN rm -rf /usr/local/lib/node_modules/corepack \
2323FROM --platform=${BUILDPLATFORM} golang:1.26 AS migrate-builder
2424ARG TARGETOS
2525ARG TARGETARCH
26- # CGO disabled, cross-compile for target platform.
27- # GOBIN must NOT be set when cross-compiling — Go refuses it.
28- # The cross-compiled binary lands in $GOPATH/bin/${GOOS}_${GOARCH}/migrate;
29- # for native builds it lands in $GOPATH/bin/migrate. Copy whichever exists.
3026ENV CGO_ENABLED=0 \
27+ GOBIN=/out \
3128 GOOS=${TARGETOS} \
3229 GOARCH=${TARGETARCH}
3330# Build only the ClickHouse migrate CLI Langfuse uses at runtime.
3431# compile this ourselves instead of downloading the upstream release
3532# because prebuilt bins bundle many unused drivers and thus inherit CVEs
3633# eg.: https://github.com/golang-migrate/migrate/issues/1357
37- RUN go install -trimpath -tags 'clickhouse' -ldflags='-s -w' \
38- github.com/golang-migrate/migrate/v4/cmd/migrate@v4.19.1 && \
39- mkdir -p /out && \
40- (cp "$(go env GOPATH)/bin/${GOOS}_${GOARCH}/migrate" /out/migrate 2>/dev/null || \
41- cp "$(go env GOPATH)/bin/migrate" /out/migrate)
34+ RUN /usr/local/go/bin/go install -trimpath -tags 'clickhouse' -ldflags='-s -w' \
35+ github.com/golang-migrate/migrate/v4/cmd/migrate@v4.19.1
4236
4337FROM --platform=${TARGETPLATFORM:-linux/amd64} build-base AS pruner
4438
@@ -187,4 +181,4 @@ CMD if [ -n "$NEXT_PUBLIC_LANGFUSE_CLOUD_REGION" ]; then \
187181 node --import dd-trace/initialize.mjs ./web/server.js --keepAliveTimeout 110000; \
188182 else \
189183 node ./web/server.js --keepAliveTimeout 110000; \
190- fi
184+ fi
0 commit comments