Tooling around deployments
I am not ashamed accepting the fact that AdonisJs never shared any documentation or tooling around deployments.
Ideally, AdonisJs needs no extra care when deploying it to production and works like any other Node.js app. However, I cannot deny the fact that majority of users are using Node.js for the first time and hence they have no prior experience with Node.js at all.
Writing docs
I will be working dedicatedly to write more documentation around how to deploy your apps in production. Everything you have to do from you should consider.
To get started I recommend reading this article on scotch.io
I a couple of weeks you will find a bunch of new docs around.
- Deploying apps to Digital Ocean, with
nginxorha-proxyserver. - Deploying apps to Heroku
- Moreover, to s3.
- Automating deployments with Github hooks and Github deployment API
Tooling
There are a bunch of great tools in the market used by small, medium and large-scale companies. It includes Docker, Ansible, Nomad and so on. I am never going to write one from scratch.
However, instead, I will try to build a small deployment pipeline wrapper, which uses these to deploy an AdonisJs application to production servers.
I'll just drop this here in case it's helpful for anyone finding this issue. pm2 is a node module that facilitates the deployment of Node applications and provides a nice dashboard to see how everything is going. Admittedly pm2 is owned by the company keymetrics and they give it out for free in hopes of you signing up for a paid plan, but the free plan allows you to monitor 3 servers and have several buckets running.
I use PM2 too (in dev and production), I don't think there's a better node process manager out there
I also think that pm2 is the best node process manager!
We speak about deployment here, pm2 is something different.
@RomainLanz my only point was that pm2 can be used for deployments. There is also a tool called shipit which works well. I would very much like to see a deploy tool for Adonis though if we ever got to that point
To be honest I don't think this is a think that should be done in near future. Basically, we're talking here about Node.js application, so any tutorial about a deployment of such applications will be good.
any progress here?
Hey @andresayej!
We are highly focus on v5 for the moment.
You can resolve this issue (in v5.1+), by ensuring that Adonis is 12 Factor App Compliant . You can read more from Kelsey Hightower I'm not sure, what more Vapor did for Laravel, but I expect that Adonis is already quite compliant.