Pony.fm/docker/entrypoint.sh
2021-03-29 00:51:06 +01:00

22 lines
340 B
Bash
Executable file

#!/usr/bin/env sh
set -e
sudo -Esu www-data php artisan optimize
MODE=$1
case $MODE in
web)
php-fpm -D
nginx -g 'pid /tmp/nginx.pid; daemon off;'
;;
worker)
sudo -Esu www-data php artisan queue:listen --queue=default,notifications,indexing --sleep=5 --tries=3
;;
*)
echo "Unknown mode given"
;;
esac