2018-06-16 07:50:38 +00:00
|
|
|
#!/bin/bash
|
2018-06-12 18:56:42 +00:00
|
|
|
|
2018-06-17 08:20:21 +00:00
|
|
|
# Create the storage tree if needed and fix permissions
|
2018-06-16 07:50:38 +00:00
|
|
|
cp -r storage.skel/* storage/
|
2018-11-11 17:03:35 +00:00
|
|
|
chown -R www-data:www-data storage/ bootstrap/cache/
|
2018-06-16 20:27:45 +00:00
|
|
|
php artisan storage:link
|
2018-06-12 18:56:42 +00:00
|
|
|
|
2018-06-17 08:20:21 +00:00
|
|
|
# Migrate database if the app was upgraded
|
2018-11-11 17:03:35 +00:00
|
|
|
gosu www-data:www-data php artisan migrate --force
|
2018-06-17 08:20:21 +00:00
|
|
|
|
2018-10-18 06:26:32 +00:00
|
|
|
# Run other specific migratins if required
|
2018-11-11 17:03:35 +00:00
|
|
|
gosu www-data:www-data php artisan update
|
2018-10-18 06:26:32 +00:00
|
|
|
|
2018-06-17 08:20:21 +00:00
|
|
|
# Run a worker if it is set as embedded
|
2018-11-14 18:11:08 +00:00
|
|
|
if [ "$HORIZON_EMBED" = "true" ]; then
|
2018-11-11 17:03:35 +00:00
|
|
|
gosu www-data:www-data php artisan horizon &
|
2018-06-17 08:20:21 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Finally run Apache
|
2018-06-12 18:56:42 +00:00
|
|
|
exec apache2-foreground
|