As long as Lightsail doesn't limit the capabilities of their VPS, I don't see why it would be any different from a normal install on Ubuntu.
yeah, it's identical. LightSail ends up being exactly like a DO or Vultr.
I recently moved up to Ubuntu 16.04.1. I see a nice example of Upstart in the documentation, but nothing for a systemd script.
Does anyone have an example script I can use to manage the NodeBB service, have it start at boot, etc?
@teh_g try it
This is what i do when running my docker pkg in systemd with nodebb (app.js)
ExecStart=/usr/bin/docker run --entrypoint su --name nodejs-nimbus-jenkler-com --net local --volumes-from server_nodejs -w /server/nodejs jenkler/nodejs nobody -s /usr/bin/node app.js
ExecStartPre=-/usr/bin/docker kill nodejs-nimbus-jenkler-com
ExecStartPre=-/usr/bin/docker rm nodejs-nimbus-jenkler-com
ExecStop=/usr/bin/docker stop nodejs-nimbus-jenkler-com
I start /usr/bin/node app.js as the nobody user! If somebody else runs nodebb in docker with another take, plz speak up. The app.js way works fine for me except for restarting via the webb ui. I guss i need loader.js for that
If i use loader.js instead of app.js the application wont exit correctly when systemd runs ExecStop. I get some strange exit code and docker get an error. I guess thats because loader is a wrapper for app.js! Correct me if I am wrong!
To answer the question run:
I guess you need to change dir also. I do that with docker -w /server/nodejs jenkler/nodejs.
You pass in
--no-silent because Upstart works best if the program itself is run interactively, with output sent to
However, I don't recall if systemd is different...
If it works best run interactively, use
If it reads output from stdout (which I believe it does), then use