Add instructions for setting up supervisor

This commit is contained in:
2019-05-25 15:46:57 -06:00
parent 95d6ac34a7
commit e554bda3eb
2 changed files with 53 additions and 0 deletions

28
webserver/README.md Normal file
View File

@@ -0,0 +1,28 @@
# Protospace lockout socket server
Runs on a server. Connects to web clients over web sockets and receives updates from all lockouts.
## Setup
### Supervisor
Supervisor is used to keep the script always running.
```
$ sudo apt install supervisor
```
Create a file named /etc/supervisor/conf.d/webserver.conf and add:
```
[program:webserver]
user=tanner
directory=/opt/pslockout/pslockout/webserver
command=/bin/bash -c 'yarn start'
autostart=true
autorestart=true
stderr_logfile=/var/log/webserver.log
stderr_logfile_maxbytes=1MB
stdout_logfile=/var/log/webserver.log
stdout_logfile_maxbytes=1MB
```