service-captcha/app/docker/start_dev.sh

25 lines
732 B
Bash
Raw Normal View History

2024-04-28 01:26:30 +05:00
#!/usr/bin/env sh
set -e
role=${CONTAINER_ROLE:-app}
if [ "$role" = "app" ]; then
exec unitd --no-daemon --control unix:/var/run/control.unit.sock --user unit --group unit
elif [ "$role" = "queue" ]; then
echo "Running the queue..."
while [ true ]
do
php /var/www/html/artisan queue:work --verbose --sleep=5 --tries=10 --max-time=3600
done
2024-04-28 01:26:30 +05:00
elif [ "$role" = "websockets" ]; then
echo "Running the websockets..."
php /var/www/html/artisan reverb:start --port=9000
elif [ "$role" = "scheduler" ]; then
while [ true ]
do
php /var/www/html/artisan schedule:run --verbose --no-interaction &
sleep 60
done
else
echo "Could not match the container role \"$role\""
exit 1
fi