BYU-ODH / hlrdesk

https://hlrdesk.hlrdev.byu.edu/
MIT License
0 stars 2 forks source link

St/server reboot #383

Closed stevethomas19 closed 8 years ago

stevethomas19 commented 8 years ago

Things to know about PM2

  1. Node 5 needs to be used
  2. npm start will start the process
  3. $(npm bin)/pm2 stop 0 stops the process
  4. $(npm bin)/pm2 logs runserver will get you the logs which we can use as the report for when the server crashes.
aldahl commented 8 years ago

This is pretty slick. We'll have to update the readme to include this. @webnard, want to look this over before we go ahead and merge it?

trevren11 commented 8 years ago

I agree with Alex It looks good but I would really like Ian to look it over as well haha. Also @stevethomas19 you can add $(npm bin)/pm2 logs runserver as a function call so you can run something like coolstuff in the package.json (I think anyway).

Loojk at this to see something similar

If you don't no worries, I can do that tomorrow or something.

webnard commented 8 years ago

Let's try it out. I think it looks great. We'll just want to make sure we've documented how to get the logs since they won't be accessible from "dokku logs hlrdesk" anymore.

stevethomas19 commented 8 years ago

@trevren11 Ok when the app is running all you have to do now is type npm run logs and the logs will appear.

webnard commented 8 years ago

And the corollary to that is that we run ssh dokku@hlrdesk.byu.edu run hlrdesk npm run logs to see the logs on the production server.