start.sh 658 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. # Create the storage tree if needed and fix permissions
  3. cp -r storage.skel/* storage/
  4. chown -R www-data:www-data storage/ bootstrap/
  5. # Refresh the environment
  6. php artisan storage:link
  7. php artisan horizon:assets
  8. php artisan route:cache
  9. php artisan view:cache
  10. php artisan config:cache
  11. # Migrate database if the app was upgraded
  12. # gosu www-data:www-data php artisan migrate --force
  13. # Run other specific migratins if required
  14. # gosu www-data:www-data php artisan update
  15. # Run a worker if it is set as embedded
  16. if [ "$HORIZON_EMBED" = "true" ]; then
  17. gosu www-data:www-data php artisan horizon &
  18. fi
  19. # Finally run Apache
  20. exec apache2-foreground