calcom / docker

The Docker configuration for Cal.com is an effort powered by people within the community. Cal.com, Inc. does not provide official support for Docker, but we will accept fixes and documentation. Use at your own risk.
MIT License
662 stars 344 forks source link

Added support for yarn 3.4.1 & node 18. #226

Closed palmtown closed 1 year ago

palmtown commented 1 year ago

Resolves issue #221

palmtown commented 1 year ago

Hello @krumware

Good question! I was unsuccessfully at getting the build to work on node:18. The build times out and generates the below error using the same version of yarn (3.4.1) and node:18. I tried as suggested in the "more info" to increase staticPageGenerationTimeout to no avail. No matter how long I increased the timeout (5, 10, 20 minutes), the process would simply timeout at the set timeout. Furthermore, I tried with several other node docker containers for testing purposes, and the same issue on all.

Error 1 Error: Collecting page data for [object Object] is still timing out after 2 attempts. See more info here https://nextjs.org/docs/messages/page-data-collection-timeout

krumware commented 1 year ago

Hi @palmtown, we were able to get the node:18 base image to build via https://github.com/calcom/docker/pull/228. If it's ok, I'm going to merge that and close this one. Thank you a ton for the help here!

Can you by chance test to see if the other branch resolves your timeout issue?

palmtown commented 1 year ago

Hello @krumware

The goal was to upgrade to yarn v3 to align with cal.com to improve CI times by 2x (https://github.com/calcom/cal.com/pull/7738). I found that pull request https://github.com/calcom/docker/pull/228 is utilizing yarn classic which doesn't solve the initial goals of this PR.

Therefore, this pull request https://github.com/calcom/docker/pull/228 merely upgrades node, however, not yarn. Is that a correct statement?

krumware commented 1 year ago

@palmtown, yarn is now included in the .yarn directory along with the yarn plugins, and is used through the now included .yarnrc. This method matches their guidance for containers. So we're actually now using the yarn which is included with calcom repo.

palmtown commented 1 year ago

Hello @krumware

I see, you are copying the .yarn and .yarnrc files as I did in PR #226. However, you utilize yarn 1.22.19 initially, as in your Dockerfile RUN yarn global add turbo is not supported in yarn v3. Hence while you run this command before you copy the files.

I did try to get it to build using PR #228, however, it failed. As I do have a working build using PR #226, I'm good in terms of my issue.

Thanks for your support and help, much appreciated!

krumware commented 1 year ago

great point! I verified post-copy that yarn 3.4.1 is being used for the install step. I see now that the yarn global add turbo needs to be corrected. thank you!

krumware commented 1 year ago

corrected