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
|
2018-06-16 09:50:38 +02:00
|
|
|
cp -r storage.skel/* storage/
|
2018-06-16 22:27:45 +02:00
|
|
|
chown -R www-data:www-data storage/
|
|
|
|
php artisan storage:link
|
2018-06-12 20:56:42 +02:00
|
|
|
|
2018-06-17 10:20:21 +02:00
|
|
|
# Migrate database if the app was upgraded
|
|
|
|
php artisan migrate --force
|
|
|
|
|
|
|
|
# Run a worker if it is set as embedded
|
|
|
|
if [ HORIZON_EMBED = true ]; then
|
|
|
|
php artisan horizon &
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Finally run Apache
|
2018-06-12 20:56:42 +02:00
|
|
|
exec apache2-foreground
|