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
migrate on appservice boot
Andras Bacsai1ad7d885b3f2
diff --git a/app/Http/Livewire/ForceUpgrade.php b/app/Http/Livewire/ForceUpgrade.phpindex f73bf9ceee..52c9a28adc 100644--- a/app/Http/Livewire/ForceUpgrade.php+++ b/app/Http/Livewire/ForceUpgrade.php@@ -10,7 +10,6 @@ class ForceUpgrade extends Component{public function upgrade(){- //if (env('APP_ENV') === 'local') {if (config('app.env') === 'local') {$server = Server::where('ip', 'coolify-testing-host')->first();if (!$server) {diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.phpindex 9945221c8a..ab8ad04c42 100644--- a/app/Providers/AppServiceProvider.php+++ b/app/Providers/AppServiceProvider.php@@ -7,6 +7,7 @@ use Illuminate\Queue\Events\JobProcessed;use Illuminate\Support\Facades\Process;use Illuminate\Support\Facades\Queue;use Illuminate\Support\ServiceProvider;+use Illuminate\Support\Str;class AppServiceProvider extends ServiceProvider{@@ -15,14 +16,9 @@ class AppServiceProvider extends ServiceProvider*/public function register(): void{- // @TODO: Is this the best place to run the seeder?- // if (env('APP_ENV') === 'production') {- // dump('Seed default data.');- // Process::run('php artisan db:seed --class=ProductionSeeder --force');- // } else {- // dump('Not in production environment.');- // }- //+ if (config('app.env') === 'production' && Str::contains(config('coolify.version'), ['nightly'])) {+ Process::run('php artisan migrate:fresh --force --seed --seeder=ProductionSeeder');+ }}/**@@ -31,9 +27,8 @@ class AppServiceProvider extends ServiceProviderpublic function boot(): void{Queue::after(function (JobProcessed $event) {- // @TODO: Remove `coolify-builder` container after the remoteProcess job is finishged and remoteProcess->type == `deployment`.+ // @TODO: Remove `coolify-builder` container after the remoteProcess job is finishged and remoteProcess->type == `deployment`.if ($event->job->resolveName() === CoolifyTask::class) {-}});}