2019-05-25 21:46:57 +00:00
|
|
|
# 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
|
2019-05-26 21:51:35 +00:00
|
|
|
command=yarn start
|
|
|
|
stopasgroup=true
|
2019-05-25 21:46:57 +00:00
|
|
|
autostart=true
|
|
|
|
autorestart=true
|
|
|
|
stderr_logfile=/var/log/webserver.log
|
|
|
|
stderr_logfile_maxbytes=1MB
|
|
|
|
stdout_logfile=/var/log/webserver.log
|
|
|
|
stdout_logfile_maxbytes=1MB
|
|
|
|
```
|