Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Dockerfile for discussion #11

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

jtoar
Copy link
Contributor

@jtoar jtoar commented May 30, 2023

I want to use this Dockerfile as a resource for today's discussion. It represents my aggregate learnings from this working group and community.

@jtoar jtoar force-pushed the ds-docker/aggregate-learnings branch from 22ff15f to 112607e Compare May 30, 2023 19:24
RUN --mount=type=cache,target=/root/.yarn/berry/cache \
--mount=type=cache,target=/root/.cache \
yarn workspaces focus api
# -> why add deps after installing?
Copy link

@xmaxcooking xmaxcooking May 31, 2023

Choose a reason for hiding this comment

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

the @redwoodjs/internal is missing in the api/package.json so 'yarn workspaces focus api' doesn't resolve the nested dependencies of @redwoodjs/core which is 'out of focus' in the root dir.

or dependending how you look at it. the dependency is missing in the @redwoodjs/api-server.

https://github.com/redwoodjs/redwood/blob/main/packages/api-server/package.json

https://github.com/redwoodjs/redwood/blob/main/packages/api-server/src/plugins/lambdaLoader.ts

installing the api-server is definitely not necessary because it's already listed as a dependency in the api/package.json.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @xmaxcooking! It seems like a bug on the framework's side if @redwoodjs/api-server doesn't pull in @redwoodjs/internal if it actually needs it. Let me see why it needs it and what I can do, because I'd love to avoid pulling internal in here if we can, it's one of the framework's biggest packages.

Choose a reason for hiding this comment

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

yes. the image without it is ~100MB lighter. revisiting this should be worth the effort.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@xmaxcooking this should let us remove the need to install it here redwoodjs/redwood#8455

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#10 would also solve this in a much better way, but it's still experimental so we may as well pursue both avenues to reduce size

Copy link
Contributor Author

@jtoar jtoar Jun 2, 2023

Choose a reason for hiding this comment

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

redwoodjs/redwood#8455 just landed in v5.2.4, so should be possible to try out and see the difference in final image size

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants