-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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 Next.js example #312
base: master
Are you sure you want to change the base?
Add Next.js example #312
Conversation
Signed-off-by: Max Proske <[email protected]>
Cc @glours just in case. It would be cool to have this ready in time for this month's Community All-Hands, when I'll speak on Compose + Next.js. Cheers! |
Might be worth noting that the official example isn't well agreed upon as best practice. And the next team hasn't been super responsive. vercel/next.js#16995 |
@tabuchid I'd love to know what improvements you see can be made, so I can help make them. (For example, if awesome-compose has firm stances on alpine, graceful shutdown, etc.) As for your concerns, the VP of Developer Experience wants to continue to evolve the best practices for using Next.js with containers: vercel/next.js#16995 (comment). They also made a tutorial recommending Docker for Next.js developers: https://www.youtube.com/watch?v=Pd2tVxhFnO4. Next.js has 3 official Docker examples. Docker is recommended for self-hosting in the docs: https://nextjs.org/docs/deployment#docker-image. The Next.js team also recently added support for developing the Next.js core in Docker: vercel/next.js#43138. |
@maxproske Two main issues as far as docker is concerned. And to be fair I'm not sure there are great answers to them. I just wish the next team would acknowledge them and address the community. My other next gripes are unrelated. No request logging and apm/observability integration limitations. As I write this I'm realizing these likely shouldn't be blockers to recommending their suggested docker-compose setup. It's as good as it can be given their limitations. |
disappointing to see this PR left with no activity from Docker |
Next.js is one of the most popular React frameworks, and awesome-compose is a fantastic springboard, so I think this example is a great addition for people looking here to Composeize their Next.js apps.
It's also a rapidly evolving framework, with every release being their biggest release ever, and often contains breaking changes. For example, bumping the minimum version of React to v18.2. For this reason, I think it's more appropriate to link to the official Next.js + Compose example, so it can be maintained by the Next.js community and Next.js team, and enjoy more frequent updates and finetuning.
This example is a bit different, and I know submodules aren't allowed #235 (review). But I noticed some reviews in this repo can take up to a few months, so I hope you consider my reasoning and making an exception for Next.js!
Next.js and Compose is a powerful combo. Combined with Multistage builds, it can output up to 85% smaller Next.js apps! (Approximately 110 MB compared to 1 GB with create-next-app)