Only run caching for the app
This commit is contained in:
parent
9652a4baf9
commit
2e0860713d
13
start
13
start
@ -11,22 +11,27 @@ if [ -x /usr/sbin/sshd -a "${SSH_START}" = "TRUE" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Laravel Specific
|
# Laravel Specific
|
||||||
if [ "${env}" != "local" -a -r "artisan" ]; then
|
if [ "${role}" = "app" ]; then
|
||||||
|
if [ "${env}" != "local" -a -r "artisan" ]; then
|
||||||
echo "Caching configuration..."
|
echo "Caching configuration..."
|
||||||
(php artisan config:cache && php artisan route:cache && php artisan view:cache)
|
(php artisan config:cache && php artisan route:cache && php artisan view:cache)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${role}" = "app" ]; then
|
|
||||||
|
|
||||||
exec /usr/local/bin/docker-php-entrypoint "$@"
|
exec /usr/local/bin/docker-php-entrypoint "$@"
|
||||||
|
|
||||||
elif [ "$role" = "queue" ]; then
|
elif [ "$role" = "queue" ]; then
|
||||||
|
|
||||||
echo "Running the queue..."
|
echo "Running the queue..."
|
||||||
|
# We'll delay starting in case the app is caching
|
||||||
|
sleep 15
|
||||||
php ${PHP_OPTIONS} artisan queue:work --verbose --tries=${WORK_TRIES:-1} --timeout=${WORK_TIMEOUT:-90} ${WORK_QUEUES:+--queue=${WORK_QUEUES}} ${WORK_MEMORY:+--memory=${WORK_MEMORY}}
|
php ${PHP_OPTIONS} artisan queue:work --verbose --tries=${WORK_TRIES:-1} --timeout=${WORK_TIMEOUT:-90} ${WORK_QUEUES:+--queue=${WORK_QUEUES}} ${WORK_MEMORY:+--memory=${WORK_MEMORY}}
|
||||||
|
|
||||||
elif [ "$role" = "scheduler" ]; then
|
elif [ "$role" = "scheduler" ]; then
|
||||||
|
|
||||||
|
echo "Running the scheduler..."
|
||||||
|
# We'll delay starting in case the app is caching
|
||||||
|
sleep 15
|
||||||
|
|
||||||
while [ true ]; do
|
while [ true ]; do
|
||||||
php ${PHP_OPTIONS} artisan schedule:run --verbose --no-interaction &
|
php ${PHP_OPTIONS} artisan schedule:run --verbose --no-interaction &
|
||||||
sleep 60
|
sleep 60
|
||||||
|
Loading…
Reference in New Issue
Block a user