You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking for the best way to launch a PHP script which is itself a long-lived server process.
Rather than replacing the S2I run script entirely, I created a php-pre-start/99-artisan-ws.sh script:
#!/bin/bash# This script is sourced by the s2i run script just before Apache httpd would# be executed. If the ARTISAN_WS environment variable is set then the# WebSocket server is launched instead of Apache httpd.if [[ -z$ARTISAN_WS ]];thenreturn 0
fiexec php artisan websockets:serve
# If we reach this point, we weren't able to run the WebSocket server. We want# the container to die rather than continue to run Apache httpd.exit 1
If that looks sane then how about documenting this approach?
The text was updated successfully, but these errors were encountered:
I was looking for the best way to launch a PHP script which is itself a long-lived server process.
Rather than replacing the S2I
run
script entirely, I created aphp-pre-start/99-artisan-ws.sh
script:If that looks sane then how about documenting this approach?
The text was updated successfully, but these errors were encountered: