Please : a reload hook!

Hi,

I’m using NodeJs and deploy my server script using SFTP from my continuous integration.
I really miss a way to restart my service once my SFTP transfer is done.

I’m actually “hacking” the admin dashboard API call : https://__id__.admin.sd3.gpaas.net/reloadapplication.php (+ Basic auth) but this “feature” is not documented and I would prefer to use a more reliable way.

Hello,

I agree something is missing here for node apps.
Maybe using Git could be a good option, if possible for you?

You can then trigger a deploy, which does more than just reload but should have the same result (and can be integrated in a pipeline).

$ ssh {instance_id}@git.{datacenter_id}.gpaas.net 'deploy {repository}.git'

Using git is cool, I tried this first !
but :

  • ‘npm install’ with dev dependencies is too long (probably no npm cache ?! or CPU)
  • build… is too long (5s on my machine, more than 20min in production)
  • the running service is impacted during this process (down time during all the build time)
  • I got no feed back / notification if this process fails :pensive:
  • logs are… so painful to get/read

I guess this option is not really reliable on a Small Simple Hosting (CPU)
Anyway, I use a CI. Having a complete install&Build on deploy is not relevant, more over when the up time is not guaranteed during this process.

Note that /reloadapplication.php works great ! Please make it supported officially ! :pray:
in CI script I get :

wget --user $PROD_SFTP_USER --password $PROD_HTTP_PASSWORD https://{instance_id}.admin.sd3.gpaas.net/reloadapplication.php