## Summary - move the Laravel application into `apps/platform` and keep the repository root for orchestration, docs, and tooling - update the local command model, Sail/Docker wiring, runtime paths, and ignore rules around the new platform location - add relocation quickstart/contracts plus focused smoke coverage for bootstrap, command model, routes, and runtime behavior ## Validation - `cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/PlatformRelocation` - integrated browser smoke validated `/up`, `/`, `/admin`, `/admin/choose-workspace`, and tenant route semantics for `200`, `403`, and `404` ## Remaining Rollout Checks - validate Dokploy build context and working-directory assumptions against the new `apps/platform` layout - confirm web, queue, and scheduler processes all start from the expected working directory in staging/production - verify no legacy volume mounts or asset-publish paths still point at the old root-level `public/` or `storage/` locations Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #213
73 lines
2.1 KiB
PHP
73 lines
2.1 KiB
PHP
<?php
|
|
|
|
use App\Jobs\PruneOldOperationRunsJob;
|
|
use App\Jobs\ReconcileAdapterRunsJob;
|
|
use App\Jobs\ScanEntraAdminRolesJob;
|
|
use App\Models\Tenant;
|
|
use Illuminate\Foundation\Inspiring;
|
|
use Illuminate\Support\Facades\Artisan;
|
|
use Illuminate\Support\Facades\Schedule;
|
|
|
|
Artisan::command('inspire', function () {
|
|
$this->comment(Inspiring::quote());
|
|
})->purpose('Display an inspiring quote');
|
|
|
|
Schedule::command('tenantpilot:schedules:dispatch')->everyMinute();
|
|
Schedule::command('tenantpilot:directory-groups:dispatch')->everyMinute();
|
|
Schedule::command('tenantpilot:alerts:dispatch')
|
|
->everyMinute()
|
|
->name('tenantpilot:alerts:dispatch')
|
|
->withoutOverlapping();
|
|
|
|
Schedule::job(new PruneOldOperationRunsJob)
|
|
->daily()
|
|
->name(PruneOldOperationRunsJob::class)
|
|
->withoutOverlapping();
|
|
|
|
Schedule::job(new ReconcileAdapterRunsJob)
|
|
->everyThirtyMinutes()
|
|
->name(ReconcileAdapterRunsJob::class)
|
|
->withoutOverlapping();
|
|
|
|
Schedule::command('tenantpilot:operation-runs:reconcile')
|
|
->everyFiveMinutes()
|
|
->name('tenantpilot:operation-runs:reconcile')
|
|
->withoutOverlapping();
|
|
|
|
Schedule::command('stored-reports:prune')
|
|
->daily()
|
|
->name('stored-reports:prune')
|
|
->withoutOverlapping();
|
|
|
|
Schedule::command('tenantpilot:review-pack:prune')
|
|
->daily()
|
|
->name('tenantpilot:review-pack:prune')
|
|
->withoutOverlapping();
|
|
|
|
Schedule::command('tenantpilot:baseline-evidence:prune')
|
|
->daily()
|
|
->name('tenantpilot:baseline-evidence:prune')
|
|
->withoutOverlapping();
|
|
|
|
Schedule::call(function (): void {
|
|
$tenants = Tenant::query()
|
|
->whereHas('providerConnections', function ($q): void {
|
|
$q->where('status', 'connected');
|
|
})
|
|
->whereNotNull('workspace_id')
|
|
->get();
|
|
|
|
foreach ($tenants as $tenant) {
|
|
ScanEntraAdminRolesJob::dispatch(
|
|
tenantId: (int) $tenant->getKey(),
|
|
workspaceId: (int) $tenant->workspace_id,
|
|
);
|
|
}
|
|
})
|
|
->daily()
|
|
->name('entra-admin-roles:scan')
|
|
->withoutOverlapping();
|
|
|
|
// TODO: Add tenantpilot:posture:dispatch schedule entry once the command
|
|
// infrastructure exists (FR-015 deferred — see specs/109 research.md §7).
|