diff --git a/init b/init index 6b89f38..283223a 100755 --- a/init +++ b/init @@ -5,9 +5,13 @@ role=${CONTAINER_ROLE:-app} env=${APP_ENV:-live} php=${PHP_DIR:-/var/www/html} composer=${COMPOSER_DIR:-/var/www/.composer} + NO_NGINX=${NO_NGINX:-TRUE} SSH_START=${SSH_START:-FALSE} + +# To run a local queue, running jobs from the queue "hostname" LOCAL_QUEUE=${LOCAL_QUEUE:-FALSE} +#LOCAL_QUEUES= Optional additional queues to run for function mp() { set +e @@ -107,9 +111,9 @@ if [ "${role}" = "app" -a -e artisan ]; then nginx_start if [ "${LOCAL_QUEUE}" = "TRUE" ]; then - echo "* Starting local queue ..." + echo "* Starting local queue for [${LOCAL_QUEUES}]..." su www-data -s /bin/sh -c " - (while true; do php ${PHP_OPTIONS} artisan queue:work --verbose --tries=${WORK_TRIES:-1} --timeout=${WORK_TIMEOUT:-90} --queue=$(hostname) ${WORK_MEMORY:+--memory=${WORK_MEMORY}} ${WORK_ONCE:+--once}; done) & + (while true; do php ${PHP_OPTIONS} artisan queue:work --verbose --tries=${WORK_TRIES:-1} --timeout=${WORK_TIMEOUT:-90} --queue=$(hostname)${LOCAL_QUEUES:+,${LOCAL_QUEUES}} ${WORK_MEMORY:+--memory=${WORK_MEMORY}} ${WORK_ONCE:+--once}; done) & " fi