pixelfed/contrib/docker/start.sh

27 lines
658 B
Bash
Raw Normal View History

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