#!/usr/bin/env sh
echo "Starting websockets servers"
nohup /usr/bin/php7.4 /var/www/html/src/common/Ratchet/bin/live-interactivity-server.php > /dev/stdout &
nohup /usr/bin/php7.4 /var/www/html/src/common/Ratchet/bin/messenger-server.php > /dev/stdout &
nohup /usr/bin/php7.4 /var/www/html/src/common/Ratchet/bin/arrowchat-server.php 8080 > /dev/stdout  &

# Finally, let the original Nginx entry point do its work, passing whatever is
# set for CMD. Use `exec` to replace the current process, to trap any signals
# (like Ctrl+C) that Docker may send it:
exec /usr/local/bin/docker-php-entrypoint "$@"
