2 years ago
deployment id: 1174b37c-7cb9-42fb-9085-1811e572b61d
# https://turbo.build/repo/docs/guides/tools/docker
# https://pnpm.io/docker
FROM node:20-alpine AS base
RUN npm install -g pnpm
ENV PNPM_HOME=/root/.local/share/pnpm
ENV PATH=$PATH:$PNPM_HOME
RUN corepack enable
RUN pnpm install -g turbo@^2
RUN apk update
RUN apk add --no-cache libc6-compat
FROM base AS prepare
WORKDIR /app
COPY . .
RUN turbo prune worker --docker
FROM base AS builder
WORKDIR /app
# First install the dependencies (as they change less often)
COPY --from=prepare /app/out/json/ .
RUN pnpm install --frozen-lockfile
# Build the project
COPY --from=prepare /app/out/full/ .
RUN turbo --filter=worker run build
FROM mcr.microsoft.com/playwright:v1.40.0-jammy AS runner
RUN npm install -g pnpm
WORKDIR /app
COPY --from=builder /app .
CMD ["node", "/app/apps/worker/dist/index.js"]ⓘ Deployment information is only viewable by project members and Railway employees.
3 Replies
2 years ago
Is there anyway that let me inspect the image and have a check?
2 years ago
After a long debugging, I found that tsup rename the built file index.cjs instead of index.js which cause this.
If we have a way which can let us pull the built image, it'll be more convenient to figure it out :)
2 years ago
It's nice that you figured this out. :)
Would you mind making a product feedback thread with the suggested feature? That would be great.
https://help.railway.app/feedback
Thanks,
David
Status changed to Awaiting User Response Railway • over 1 year ago
7 months ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 7 months ago