a174aff5c8
## Summary
Fix the website-new Docker build which currently fails with:
\`\`\`
NX \"production\" is an invalid fileset.
All filesets have to start with either {workspaceRoot} or {projectRoot}.
\`\`\`
\`packages/twenty-website-new/project.json\` declares \`\"inputs\":
[\"production\", \"^production\"]\` — a named input defined in the root
\`nx.json\`. Without copying \`nx.json\` into the image, nx can't
resolve it and the build fails.
Mirrors what the main twenty Dockerfile already does (line 9 of
\`packages/twenty-docker/twenty/Dockerfile\` copies both
\`tsconfig.base.json\` and \`nx.json\`).
## Test plan
- [ ] Re-run twenty-infra's \`Deploy Website New\` workflow (dev) —
build step should now pass
Made with [Cursor](https://cursor.com)
38 lines
1.0 KiB
Docker
38 lines
1.0 KiB
Docker
FROM node:24-alpine AS twenty-website-new-build
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
COPY ./package.json .
|
|
COPY ./yarn.lock .
|
|
COPY ./.yarnrc.yml .
|
|
COPY ./tsconfig.base.json .
|
|
COPY ./nx.json .
|
|
COPY ./.yarn/releases /app/.yarn/releases
|
|
COPY ./.yarn/patches /app/.yarn/patches
|
|
COPY ./packages/twenty-oxlint-rules /app/packages/twenty-oxlint-rules
|
|
COPY ./packages/twenty-website-new/package.json /app/packages/twenty-website-new/package.json
|
|
|
|
RUN yarn
|
|
|
|
COPY ./packages/twenty-website-new /app/packages/twenty-website-new
|
|
RUN npx nx build twenty-website-new
|
|
|
|
FROM node:24-alpine AS twenty-website-new
|
|
|
|
WORKDIR /app/packages/twenty-website-new
|
|
|
|
COPY --from=twenty-website-new-build /app /app
|
|
|
|
WORKDIR /app/packages/twenty-website-new
|
|
|
|
LABEL org.opencontainers.image.source=https://github.com/twentyhq/twenty
|
|
LABEL org.opencontainers.image.description="This image provides a consistent and reproducible environment for the new marketing website."
|
|
|
|
RUN chown -R 1000 /app
|
|
|
|
# Use non root user with uid 1000
|
|
USER 1000
|
|
|
|
CMD ["/bin/sh", "-c", "npx nx start twenty-website-new"]
|