File tree Expand file tree Collapse file tree
variations/frankenphp/etc/frankenphp Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,9 +10,8 @@ script_name="laravel-automations"
1010: " ${AUTORUN_ENABLED:= false} "
1111: " ${AUTORUN_DEBUG:= false} "
1212
13-
1413# Set default values for storage link
15- : " ${AUTORUN_LARAVEL_STORAGE_RECREATE:= false } "
14+ : " ${AUTORUN_LARAVEL_STORAGE_RECREATE:= true } "
1615: " ${AUTORUN_LARAVEL_STORAGE_LINK:= true} "
1716
1817# Set default values for optimizations
@@ -127,6 +126,15 @@ artisan_migrate() {
127126 fi
128127}
129128
129+ artisan_setup_octane () {
130+ echo " 🚀 Setup Laravel Octane: \" php artisan octane:install --server=$OCTANE_SERVER \" ..."
131+ if ! php " $APP_BASE_DIR /artisan" octane:install --server=$OCTANE_SERVER ; then
132+ echo " ❌ $script_name : Laravel Octane setup failed"
133+ return 1
134+ fi
135+ return 0
136+ }
137+
130138artisan_storage_recreate () {
131139 storage_paths=' storage/app/public storage/framework/cache/data storage/framework/sessions storage/framework/testings storage/framework/views storage/logs'
132140 for path in ${storage_paths} ; do
@@ -419,6 +427,11 @@ if laravel_is_installed; then
419427 fi
420428
421429 echo " 🤔 Checking for Laravel automations..."
430+ # If OCTANE_SERVER is set, run the Octane setup
431+ if [ -n " $OCTANE_SERVER " ]; then
432+ artisan_setup_octane
433+ fi
434+
422435 if [ " $AUTORUN_LARAVEL_STORAGE_RECREATE " = " true" ]; then
423436 artisan_storage_recreate
424437 fi
Original file line number Diff line number Diff line change 1515 import log-level/global/{$LOG_OUTPUT_LEVEL:info}.caddyfile
1616
1717 frankenphp {
18+ import worker/{$OCTANE_SERVER:off}.caddyfile
19+
1820 {$FRANKENPHP_CONFIG}
1921 }
2022
Original file line number Diff line number Diff line change 1+ # FrankenPHP worker configuration
2+ worker {
3+ file {$CADDY_APP_PUBLIC_PATH:/var/www/html/public }/frankenphp-worker.php
4+ {$FRANKENPHP_WORKER_CONFIG}
5+ }
Original file line number Diff line number Diff line change 1+ # Off mode worker configuration
You can’t perform that action at this time.
0 commit comments