@Kyrne I've installed the extension, it seems great so far, thank you! I've been dreaming to leave Pusher for a long time 😃
A few minor things about the documentation:
- in the nginx configuration you use 6001 as the localhost WebSocket port, but the default is actually 2083
- instead of that
/nonexistent
I personally used /dev/null
, which maybe is safer/faster?
- the part where you explain how to start the web server seems to be part of the option 3. It took me a while to understand that it's another section... 🙂
For keeping the WS server alive I opted for a Linux service. This is my service configuration, in case someone is looking for a sample file:
[Unit]
Description=flarum-websocket
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
User=deploy
WorkingDirectory=/var/www/forum
ExecStart=/usr/bin/php flarum websocket:serve
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
EDIT: it would be very interesting to have a dashboard to see the current (/past?) number of concurrent connections/exchanged messages