Update API Dockerfile#1231
Merged
mogery merged 1 commit intofirecrawl:loorisr/better-api-dockerfilefrom Feb 21, 2025
Merged
Conversation
mogery
requested changes
Feb 21, 2025
|
|
||
| FROM base | ||
| COPY --from=prod-deps /app/node_modules /app/node_modules | ||
| COPY --from=build /app /app |
Member
There was a problem hiding this comment.
Not convinced this is the right move here, as we specifically only want the prod deps to be in the resulting image. A better solution seems to me like re-adding the prod-deps build and moving the copy order around.
Suggested change
| COPY --from=build /app /app | |
| COPY --from=build /app /app | |
| COPY --from=prod-deps /app/node_modules /app/node_modules |
Contributor
Author
There was a problem hiding this comment.
Yes I agree, I think you should copy /app/dist from the build docker . not /app
Cf https://pnpm.io/docker
Contributor
Author
There was a problem hiding this comment.
I've just tried and it doesn't run. It does compile but then
Cannot find module 'mammoth'
Cannot find module 'express'
Member
There was a problem hiding this comment.
Yeah, saw the same. Trying to figure it out.
Member
|
Merging this into a branch in the main repo first so I can run tests on it and deploy to staging properly. (CI difficulties 😅) |
e03ddf4
into
firecrawl:loorisr/better-api-dockerfile
0 of 17 checks passed
mogery
added a commit
that referenced
this pull request
Feb 21, 2025
* Update Dockerfile (#1231) * Dockerfile: re-add prod-deps stage and fix copies --------- Co-authored-by: Loris <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update to latest version of tools.
Clean up
Reduce image size to 800mo (uncompressed)
See #1230