start.sh 534 B

1234567891011121314151617181920
  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/cache/
  5. php artisan storage:link
  6. # Migrate database if the app was upgraded
  7. gosu www-data:www-data php artisan migrate --force
  8. # Run other specific migratins if required
  9. gosu www-data:www-data php artisan update
  10. # Run a worker if it is set as embedded
  11. if [ "$HORIZON_EMBED" = "true" ]; then
  12. gosu www-data:www-data php artisan horizon &
  13. fi
  14. # Finally run Apache
  15. exec apache2-foreground