Launching Node.js applications will now:
- configure and create volume(s) for sqlite3
- attach consul for litefs
- set secrets for remix apps
- initialize git
- define a staging app if one is mentioned in
.github/workflows/deploy.yml
This assumes that you have been through the fly walkthrough.
Together this makes launching an Epic Remix app with LiteFS as simple as removing the V1 (nomad) configuration they generate and launching. While I have been focusing on Epic, these features are now available to all Node apps.
Try it out! Feedback welcome! What is broken? What is missing? What else is needed to get fly-apps/dockerfile-node working with the other Node frameworks?
The current set of requirements for your application to be fully supported:
- You need to be running Node 16 or later
- Your app needs to have a
package.json
file - This
package.json
needs to include astart
script and optionally abuild
script. - If
process.env.PORT
is set, you need to start your web server on this port - If
process.env.DATABASE_URL
is set, you need to use this URL to locate your database.
There also is a small but growing list of options you can specify after launch by running the following command:
npx dockerfile
The “sister” package, fly-apps/dockerfile-rails, will even do things like scan package.json
for puppeteer
and, if found, will add instructions to the Dockerfile
to install and configure Chrome/Chromium. If there are features like this that would be helpful to Node users, open an issue, or better yet, a pull request.
Related reading for more depth/context: