2018-06-16 09:50:38 +02:00
|
|
|
#!/bin/bash
|
2018-06-12 20:56:42 +02:00
|
|
|
|
2018-06-17 10:20:21 +02:00
|
|
|
# Create the storage tree if needed and fix permissions
|
2019-04-22 10:36:58 +08:00
|
|
|
cp -r storage.skel/* storage/
|
2019-04-19 01:32:36 +08:00
|
|
|
chown -R www-data:www-data storage/ bootstrap/
|
2019-04-24 21:59:13 +08:00
|
|
|
|
|
|
|
# Refresh the environment
|
2018-06-16 22:27:45 +02:00
|
|
|
php artisan storage:link
|
2019-04-24 21:59:13 +08:00
|
|
|
php artisan horizon:assets
|
|
|
|
php artisan route:cache
|
|
|
|
php artisan view:cache
|
|
|
|
php artisan config:cache
|
2018-06-12 20:56:42 +02:00
|
|
|
|
2018-06-17 10:20:21 +02:00
|
|
|
# Migrate database if the app was upgraded
|
2019-04-19 01:32:36 +08:00
|
|
|
# gosu www-data:www-data php artisan migrate --force
|
2018-06-17 10:20:21 +02:00
|
|
|
|
2018-10-18 08:26:32 +02:00
|
|
|
# Run other specific migratins if required
|
2019-04-19 01:32:36 +08:00
|
|
|
# gosu www-data:www-data php artisan update
|
2018-06-17 10:20:21 +02:00
|
|
|
|
2019-04-24 21:59:13 +08:00
|
|
|
# Run a worker if it is set as embedded
|
|
|
|
if [ "$HORIZON_EMBED" = "true" ]; then
|
|
|
|
gosu www-data:www-data php artisan horizon &
|
|
|
|
fi
|
|
|
|
|
2018-06-17 10:20:21 +02:00
|
|
|
# Finally run Apache
|
2018-06-12 20:56:42 +02:00
|
|
|
exec apache2-foreground
|