Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ composer install
2. `generateApplicationKey()` — skips if `APP_KEY` already set
3. `setupDatabase()` — runs `migrate` (or `migrate:fresh` with `--fresh`) with seed
4. `runStack()` — calls `saucebase:stack` with the selected framework
5. `setupModules()` — fetches available modules from Packagist, `composer require`s selected ones, then: `dump-autoload` → `applyModulePatches()` → `modules:sync` → per-module `modules:migrate` + `modules:seed`
5. `setupModules()` — fetches available modules from Packagist, batches all selected into one `composer require` call, then: `applyModulePatches()` → `modules:sync` → `migrate --force` (auto-discovered via InterNACHI/modular) → `db:seed --module={name} --force` per module
6. `createStorageLink()` + `clearCaches()`

**Docker flow** (`DockerEnvironment::run()`):
Expand All @@ -48,7 +48,7 @@ composer install
7. `startDocker()` — `docker compose restart` + `docker compose up -d --wait --build` (30 min timeout, streaming output)
8. `runComposerInContainer()` — `composer install` in the `app` container
9. `generateAppKey()` → `runMigrations()` → `runStack()` — artisan steps in the container via `execInContainer()`
10. `installModules()` — per module: `composer require` in container → `applyModulePatches()` on host → `modules:sync` → `modules:migrate` → `modules:seed` in container
10. `installModules()` — single batched `composer require` for all modules in container → `applyModulePatches()` on host → `modules:sync` → `migrate --force` → `db:seed --module={name} --force` per module in container
11. `createStorageLink()` + `clearCaches()` in container
12. `reloadDocker()` — `docker compose up -d --wait`

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Prompts for the frontend stack (Vue or React) and the environment driver (Docker
4. Patches `.env` with Docker-appropriate defaults — MySQL credentials, `MAIL_MAILER=smtp` for Mailpit, and `APP_URL` matching the SSL choice
5. Starts `docker compose` and installs PHP dependencies inside the container
6. Generates `APP_KEY`, runs migrations, wires up the frontend stack
7. Installs any selected modules (`composer require` → patches → `modules:sync` → `modules:migrate` → `modules:seed` per module)
7. Installs any selected modules (single `composer require` for all → patches → `modules:sync` → `migrate` → `db:seed --module` per module)
8. Creates the storage symlink and clears caches

**Native driver** (`--driver=native`):
Expand Down
16 changes: 8 additions & 8 deletions src/Console/Commands/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,16 +342,16 @@ protected function setupModules(): void
return $process->isSuccessful();
});

foreach ($selected as $package) {
$name = Str::after($package, '/');
$this->components->task('Running module migrations', function () {
$process = new Process([PHP_BINARY, base_path('artisan'), 'migrate', '--force']);
$process->setTimeout(300);
$process->run();

$this->components->task("Migrating {$name}", function () use ($name) {
$process = new Process([PHP_BINARY, base_path('artisan'), 'modules:migrate', "--module={$name}", '--force']);
$process->setTimeout(120);
$process->run();
return $process->isSuccessful();
});

return $process->isSuccessful();
});
foreach ($selected as $package) {
$name = Str::after($package, '/');

$this->components->task("Seeding {$name}", function () use ($name) {
$process = new Process([PHP_BINARY, base_path('artisan'), 'db:seed', "--module={$name}", '--force']);
Expand Down
2 changes: 1 addition & 1 deletion src/Environments/DockerEnvironment.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,10 @@ protected function installModules(InstallCommand $command): void

$command->applyModulePatches($modules);
$this->execInContainer($command, ['php', 'artisan', 'modules:sync']);
$this->execInContainer($command, ['php', 'artisan', 'migrate', '--force'], timeout: 300);

foreach ($modules as $package) {
$name = Str::after($package, '/');
$this->execInContainer($command, ['php', 'artisan', 'modules:migrate', "--module={$name}", '--force'], timeout: 120);
$this->execInContainer($command, ['php', 'artisan', 'db:seed', "--module={$name}", '--force']);
}
}
Expand Down