Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	package.json
  • Loading branch information
synox committed Nov 22, 2019
2 parents 6a22935 + b6ab20e commit abb33bf
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 14 deletions.
19 changes: 19 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,22 @@ Requires [Node.js 10](https://nodejs.org).
open http://localhost:3000


# Self-Hosted: Process monitoring and startup
Usually, you want this program to run as a service, wich can restart itself in case of crashing, and on every reboot.
This is possible vía [pm2, the nodejs process manager](http://pm2.keymetrics.io/).

1. Run the program using some pm2 flags. You can name processes, I used `--name email`. The `--watch` option restarts the app when dies for any reason.
```
cd void-mail
pm2 --name email start npm -- start --watch
```

2. Save your current list of running processes, so them resurrect when you reboot.
`pm2 save`

3. Make your system to run it on boot/reboot. You can run it with sudo directly.
`pm2 startup`

4. Once you did this, you can try to reboot things.
- Reboot your system and check if void-mail gets started. (`reboot`)
- Kill node app instance and see if gets respawned (ie `kill -9 ``pgrep node`` `)
29 changes: 16 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"helmet": "^3.16.0",
"http-errors": "~1.6.2",
"imap-simple": "^4.3.0",
"lodash": "^4.17.11",
"lodash": "^4.17.13",
"mailparser": "^2.4.3",
"mem": "^4.2.0",
"mnemonist": "^0.27.2",
Expand Down

0 comments on commit abb33bf

Please sign in to comment.