New nodejs launcher

Previously fly launch would produce a custom Dockerfile for nextjs and nuxtjs, and use heroku buildpacks for all other node applications.

Starting with flyctl release 0.0.418, fly launch will still check for nextjs and nuxtjs first, but then instead of defaulting always to buildpacks we will produce a minimal Dockerfile if we detect a start script in package.json. Only if there is no start script will we continue to fall back to build packs.

The problem with node is that it is more of a meme than a framework. You can use whatever script name you like, whatever port you like, and there are numerous frameworks to pick from.

The problem with buildpacks is that they are magical. When they work, they are great. When you have custom needs, however, getting the magic to go your way requires a wizard. And wizards are in short supply these days.

So we are trying something different. The dockerfile will install the exact same version of node that you are using. It will do the same for yarn if that’s something you make use of. It will run your build script if you have one. And it will run your start script.

No magic.

If you have custom build processes beyond what is run by the script command, feel free to adapt the Dockerfile produced to your needs. If there are common patterns that can be detected (i.e., patterns of the form “if you see X in package.json, add Y to the Dockerfile”), let us know.


Having a Dockerfile around is an example of great product philosophy. For instance, people who came from Heroku often want to see cron functionality not realizing that it’s already there! Everything they need to do is to change the Dockerfile according to their needs, e.g. installing and configuring cron.

Buildpacks hide all that - this may be a blessing or a curse. But at least having a Dockerfile around might give them a clue.