## 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
41 lines
1.8 KiB
Markdown
41 lines
1.8 KiB
Markdown
# Local Command Model Contract
|
|
|
|
## Canonical Working Directory
|
|
|
|
- The canonical working directory for the platform app is `apps/platform`.
|
|
|
|
## Canonical Commands
|
|
|
|
| Purpose | Canonical Command |
|
|
|---------|-------------------|
|
|
| Install PHP dependencies | `cd apps/platform && composer install` |
|
|
| Start local stack | `cd apps/platform && ./vendor/bin/sail up -d` |
|
|
| Stop local stack | `cd apps/platform && ./vendor/bin/sail stop` |
|
|
| Run artisan | `cd apps/platform && ./vendor/bin/sail artisan <command>` |
|
|
| Build assets | `cd apps/platform && ./vendor/bin/sail npm run build` |
|
|
| Run tests | `cd apps/platform && ./vendor/bin/sail artisan test --compact` |
|
|
| Run formatter | `cd apps/platform && ./vendor/bin/sail bin pint --dirty --format agent` |
|
|
|
|
## Delegation Rules
|
|
|
|
- Root-level wrappers, tasks, MCP configs, or aliases are compatibility helpers only.
|
|
- Any root-level helper must do nothing except delegate transparently to `apps/platform`.
|
|
- Documentation must not present root-level delegation as a second primary workflow.
|
|
|
|
## Environment Contract
|
|
|
|
- `apps/platform/.env` is the canonical Laravel environment file.
|
|
- `apps/platform/.env.example` is the canonical application example env file.
|
|
- If app-local Sail needs to target the repo-root compose file, the bridge must be configured explicitly, for example via `SAIL_FILES`.
|
|
- Any root-level env file must be compose-only and must not duplicate canonical app config truth.
|
|
|
|
## Compose Contract
|
|
|
|
- The authoritative compose file remains `docker-compose.yml` at repo root.
|
|
- Web and queue services must mount `./apps/platform` into `/var/www/html`.
|
|
- Queue commands must execute against the relocated app root.
|
|
|
|
## Deployment Contract
|
|
|
|
- Application deploy commands run from `apps/platform`.
|
|
- Existing Filament asset deployment remains required and is executed as `php artisan filament:assets` from `apps/platform`. |