diff --git a/src/Console/PublishCommand.php b/src/Console/PublishCommand.php index 48ae0465..64f5f589 100644 --- a/src/Console/PublishCommand.php +++ b/src/Console/PublishCommand.php @@ -28,6 +28,7 @@ class PublishCommand extends Command public function handle() { $this->call('vendor:publish', ['--tag' => 'sail-docker']); + $this->call('vendor:publish', ['--tag' => 'sail-database']); file_put_contents( $this->laravel->basePath('docker-compose.yml'), @@ -36,11 +37,15 @@ public function handle() './vendor/laravel/sail/runtimes/8.2', './vendor/laravel/sail/runtimes/8.1', './vendor/laravel/sail/runtimes/8.0', + './vendor/laravel/sail/database/mysql', + './vendor/laravel/sail/database/pgsql' ], [ './docker/8.2', './docker/8.1', './docker/8.0', + './docker/mysql', + './docker/pgsql' ], file_get_contents($this->laravel->basePath('docker-compose.yml')) ) diff --git a/src/SailServiceProvider.php b/src/SailServiceProvider.php index da30d9fc..b8d58242 100644 --- a/src/SailServiceProvider.php +++ b/src/SailServiceProvider.php @@ -52,6 +52,10 @@ protected function configurePublishing() $this->publishes([ __DIR__ . '/../bin/sail' => $this->app->basePath('sail'), ], ['sail', 'sail-bin']); + + $this->publishes([ + __DIR__ . '/../database' => $this->app->basePath('docker'), + ], ['sail', 'sail-database']); } }