An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix: init script + optimize laravel
Andras Bacsai210a428f938c
diff --git a/app/Console/Commands/Init.php b/app/Console/Commands/Init.phpindex bbf1dc0930..400af8149e 100644--- a/app/Console/Commands/Init.php+++ b/app/Console/Commands/Init.php@@ -2,7 +2,6 @@namespace App\Console\Commands;-use App\Actions\Server\StopSentinel;use App\Enums\ActivityTypes;use App\Enums\ApplicationDeploymentStatus;use App\Models\ApplicationDeploymentQueue;@@ -12,6 +11,7 @@ use App\Models\Server;use App\Models\StandalonePostgresql;use App\Models\User;use Illuminate\Console\Command;+use Illuminate\Support\Facades\Artisan;use Illuminate\Support\Facades\File;use Illuminate\Support\Facades\Http;@@ -25,6 +25,8 @@ class Init extends Commandpublic function handle(){+ $this->optimize();+if (isCloud() && ! $this->option('force-cloud')) {echo "Skipping init as we are on cloud and --force-cloud option is not set\n";@@ -39,7 +41,6 @@ class Init extends Command}// Backward compatibility- // $this->disable_metrics();$this->replace_slash_in_environment_name();$this->restore_coolify_db_backup();$this->update_user_emails();@@ -95,19 +96,13 @@ class Init extends CommandFile::put(base_path('templates/service-templates.json'), json_encode($services));}}- // private function disable_metrics()- // {- // if (version_compare('4.0.0-beta.312', config('version'), '<=')) {- // foreach ($this->servers as $server) {- // if ($server->settings->is_metrics_enabled === true) {- // $server->settings->update(['is_metrics_enabled' => false]);- // }- // if ($server->isFunctional()) {- // StopSentinel::dispatch($server)->onQueue('high');- // }- // }- // }- // }++ private function optimize()+ {+ echo "Optimizing Laravel deployment.\n";+ Artisan::call('optimize:clear');+ Artisan::call('optimize');+ }private function update_user_emails(){diff --git a/docker/prod/etc/s6-overlay/s6-rc.d/init-script/up b/docker/prod/etc/s6-overlay/s6-rc.d/init-script/upindex 3f689a7c5b..3b252b7829 100644--- a/docker/prod/etc/s6-overlay/s6-rc.d/init-script/up+++ b/docker/prod/etc/s6-overlay/s6-rc.d/init-script/up@@ -1,7 +1,3 @@#!/command/execlineb -Ps6-setuidgid webuser-foreground {- php /var/www/html/artisan optimize:clear- php /var/www/html/artisan optimize- php /var/www/html/artisan app:init-}+php /var/www/html/artisan app:init