Post

Dreams of Code
Dreams of Code@dreamsofcode_io·
Am I confused... You can deploy a Next.js app via Docker... right?
English
109
2
335
107.6K
dax
dax@thdxr·
dax@thdxr

there's a lot of misinformation about OpenNext and why it exists - going to lay it out here so i can reference it when people deploy nextjs outside of vercel, they expect something pretty simple since for most companies it's "just a frontend" they run into surprising issues with various features not working or behaving weirdly - you may not have seen these personally but they do exist historically there were fragmented efforts to reverse engineer these problems but none of them really stuck around given how much next changes and how complicated it has gotten OpenNext was created because people kept coming to us asking for help with this problem given we help people ship applications to AWS it primarily is the missing documentation about various nextjs internals, ideas on how to deploy certain complex features and their tradeoffs, quirks, workarounds, etc it also is a test suite that checks deployments to see if they are behaving correctly - these often break even on patch releases so it's quite tedious to keep the reverse engineering accurate finally it's some code that takes nextjs build output and massages it into something that can be deployed properly for some reason vercel employees keep saying that it is somehow a competitor to vercel trying to recreate vercel features that is not true - the focus is entirely on nextjs features listed in nextjs documentation. it does not bother with vercel features like feature flags, firewall, builds, domains, etc - no one is asking us for that it can't even create infrastructure for you - it serves as a collaborative effort so people deploying through terraform, sst, pulumi, k8s, even other hosting platforms can centralize efforts given how complicated nextjs has gotten, how coupled it is to vercel infra, and how intimately familiar we are with the hassle of self-hosting it, we often tell people to stay on vercel unless they have a good reason to move off (often it's price at scale) we really aren't out here actively focused on getting people to self-host their nextjs apps we deal with it because it's popular and we can't discriminate with our goal of helping people deploy anything even if it's the least important part of their system

QME
1
0
7
1.5K
brandon
brandon@brandonweng·
@dreamsofcode_io We run Nextjs on ECS fargate in docker containers. They have a docker file example: github.com/vercel/next.js… Only complaint is that it takes ~10 mins to build on 16 core Github workers and images are large. If anyone knows more about how to speed it up, would love to learn more..
English
14
0
45
9.6K
Mihai Dinu
Mihai Dinu@mihaidinu88·
@dreamsofcode_io Bro looking at that vercel bill and asking himself if vercel really is the devil 😭 yes u can, that's why I said a few days ago vercel is (probably) not the devil
English
1
0
10
5.5K
Harshal Patil
Harshal Patil@mistyHarsh·
@dreamsofcode_io Many features are inherently tied to Vercel runtime. They won't work well on dockerized Node.js runtime.
English
3
0
3
2.6K
Paylaş