Skip to content
This repository was archived by the owner on Oct 14, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends netcat-openbsd
# the tree lets the runtime write its caches (Next ISR, prisma engines) without
# adding a duplicate copy-up layer that a separate chown -R would create.
COPY --from=builder-two --chown=node:node /calcom ./
# WORKDIR created /calcom itself as root-owned, so the node user cannot create
# turbo's runtime cache dir there - `yarn start` (turbo run start) died with
# "failed to create directory /calcom/.turbo" and crash-looped the container.
RUN mkdir -p /calcom/.turbo && chown node:node /calcom/.turbo
Comment on lines +108 to +111

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Instead of pre-creating specific directories like /calcom/.turbo, it is more robust and future-proof to change the ownership of the /calcom directory itself. Since WORKDIR creates /calcom as root-owned, changing its ownership non-recursively to node:node allows the node user to create any necessary runtime cache directories or files (including .turbo) dynamically at runtime without duplicating layers.

# WORKDIR created /calcom itself as root-owned, so the node user cannot write
# to it. Changing ownership of the directory itself (non-recursively) allows
# the node user to create runtime cache directories like .turbo.
RUN chown node:node /calcom

ARG NEXT_PUBLIC_WEBAPP_URL=https://cal.crove.com
ENV NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL \
BUILT_NEXT_PUBLIC_WEBAPP_URL=$NEXT_PUBLIC_WEBAPP_URL
Expand Down
Loading