Deployment: Upgrade Dockerfile with multi-stage asset building, add Redis service and queue workers
This commit is contained in:
@@ -3,8 +3,9 @@ set -e
|
||||
|
||||
if [ ! -f /var/www/html/database/database.sqlite ]; then
|
||||
touch /var/www/html/database/database.sqlite
|
||||
chown www-data:www-data /var/www/html/database/database.sqlite
|
||||
fi
|
||||
chown -R www-data:www-data /var/www/html/database
|
||||
chmod -R 775 /var/www/html/database
|
||||
|
||||
if [ -z "$APP_KEY" ]; then
|
||||
php artisan key:generate --force --no-interaction
|
||||
|
||||
@@ -13,3 +13,16 @@ stdout_logfile_maxbytes=0
|
||||
command=nginx -g 'daemon off;'
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
|
||||
[program:laravel-worker]
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
command=php /var/www/html/artisan queue:work --sleep=3 --tries=3 --max-time=3600
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stopasgroup=true
|
||||
killasgroup=true
|
||||
numprocs=1
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
|
||||
Reference in New Issue
Block a user