Skip to content

Commit f05e313

Browse files
napan24napan.vijayvargiya
andauthored
reverted docker files (#7)
* reverted docker files * only build amd images --------- Co-authored-by: napan.vijayvargiya <napan.vijayvargiya@flipkart.com>
1 parent 880d2a5 commit f05e313

3 files changed

Lines changed: 9 additions & 15 deletions

File tree

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
with:
7474
context: .
7575
file: ${{ matrix.dockerfile }}
76-
platforms: linux/amd64,linux/arm64
76+
platforms: linux/amd64
7777
push: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
7878
tags: ${{ steps.meta.outputs.tags }}
7979
labels: ${{ steps.meta.outputs.labels }}

web/Dockerfile

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ RUN npm install turbo@2.9.12 --global
1111
ENV PNPM_HOME="/pnpm"
1212
ENV PATH="$PNPM_HOME:$PATH"
1313
RUN corepack enable
14-
RUN corepack prepare pnpm@10.33.0 --activate
14+
RUN corepack prepare pnpm@11.1.3 --activate
1515

1616
FROM --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 \
2323
FROM --platform=${BUILDPLATFORM} golang:1.26 AS migrate-builder
2424
ARG TARGETOS
2525
ARG 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.
3026
ENV 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

4337
FROM --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

worker/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ RUN npm install turbo@2.9.12 --global
1111
ENV PNPM_HOME="/pnpm"
1212
ENV PATH="$PNPM_HOME:$PATH"
1313
RUN corepack enable
14-
RUN corepack prepare pnpm@10.33.0 --activate
14+
RUN corepack prepare pnpm@11.1.3 --activate
1515

1616
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine AS runtime-base
1717
# package managers and build-only CLIs only increase exposure to CVEs -> remove them
@@ -55,7 +55,7 @@ FROM --platform=${TARGETPLATFORM:-linux/amd64} builder AS prod-deps
5555
# we only need the prod + generated prisma client plus .prisma artifacts
5656
# @langfuse/shared still pulls in next-auth transitively, so keep the deploy output
5757
# intact here instead of pruning node_modules in Docker.
58-
# also, pnpm v10 needs the pnpm legacy deploy implementation, we didn't upgrade that yet
58+
# Keep legacy deploy until the worker Docker image is verified with pnpm's default deploy implementation.
5959
RUN pnpm --filter worker deploy --legacy --prod /prod/worker && \
6060
builder_prisma_client_dir="$(find /app/node_modules/.pnpm -path '*/node_modules/@prisma/client' -type d | head -n 1)" && \
6161
deployed_prisma_client_dir="$(find /prod/worker/node_modules/.pnpm -path '*/node_modules/@prisma/client' -type d | head -n 1)" && \
@@ -99,4 +99,4 @@ ENV PORT=3030
9999
ENTRYPOINT ["dumb-init", "--", "./worker/entrypoint.sh"]
100100

101101
# startup command
102-
CMD ["node", "worker/dist/index.js"]
102+
CMD ["node", "worker/dist/index.js"]

0 commit comments

Comments
 (0)