## 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
98 lines
2.5 KiB
YAML
98 lines
2.5 KiB
YAML
services:
|
|
laravel.test:
|
|
build:
|
|
context: ./apps/platform/vendor/laravel/sail/runtimes/8.4
|
|
dockerfile: Dockerfile
|
|
args:
|
|
WWWGROUP: '${WWWGROUP:-1000}'
|
|
NODE_VERSION: '20'
|
|
image: tenantatlas-laravel
|
|
extra_hosts:
|
|
- 'host.docker.internal:host-gateway'
|
|
ports:
|
|
- '${APP_PORT:-80}:80'
|
|
- '${VITE_PORT:-5173}:${VITE_PORT:-5173}'
|
|
environment:
|
|
WWWUSER: '${WWWUSER:-1000}'
|
|
WWWGROUP: '${WWWGROUP:-1000}'
|
|
LARAVEL_SAIL: 1
|
|
APP_SERVICE: laravel.test
|
|
TENANTATLAS_REPO_ROOT: /var/www/repo
|
|
entrypoint: ["/bin/sh", "-c", "mkdir -p /var/www/html/node_modules && chown ${WWWUSER:-1000}:${WWWGROUP:-1000} /var/www/html/node_modules || true; exec start-container"]
|
|
working_dir: /var/www/html
|
|
volumes:
|
|
- './apps/platform:/var/www/html'
|
|
- '.:/var/www/repo:ro'
|
|
- '/var/www/html/node_modules'
|
|
networks:
|
|
- sail
|
|
depends_on:
|
|
- pgsql
|
|
- redis
|
|
|
|
queue:
|
|
build:
|
|
context: ./apps/platform/vendor/laravel/sail/runtimes/8.4
|
|
dockerfile: Dockerfile
|
|
args:
|
|
WWWGROUP: '${WWWGROUP:-1000}'
|
|
NODE_VERSION: '20'
|
|
image: tenantatlas-laravel
|
|
extra_hosts:
|
|
- 'host.docker.internal:host-gateway'
|
|
environment:
|
|
WWWUSER: '${WWWUSER:-1000}'
|
|
WWWGROUP: '${WWWGROUP:-1000}'
|
|
LARAVEL_SAIL: 1
|
|
APP_SERVICE: queue
|
|
TENANTATLAS_REPO_ROOT: /var/www/repo
|
|
entrypoint:
|
|
- /bin/sh
|
|
- -c
|
|
- mkdir -p /var/www/html/node_modules && chown ${WWWUSER:-1000}:${WWWGROUP:-1000} /var/www/html/node_modules || true; exec start-container "$@"
|
|
- --
|
|
working_dir: /var/www/html
|
|
volumes:
|
|
- './apps/platform:/var/www/html'
|
|
- '.:/var/www/repo:ro'
|
|
- '/var/www/html/node_modules'
|
|
networks:
|
|
- sail
|
|
depends_on:
|
|
- laravel.test
|
|
- pgsql
|
|
- redis
|
|
command: php artisan queue:work --tries=3 --timeout=300 --sleep=3 --max-jobs=1000
|
|
|
|
pgsql:
|
|
image: 'postgres:16'
|
|
ports:
|
|
- '${FORWARD_DB_PORT:-5432}:5432'
|
|
environment:
|
|
POSTGRES_DB: '${DB_DATABASE:-tenantatlas}'
|
|
POSTGRES_USER: '${DB_USERNAME:-root}'
|
|
POSTGRES_PASSWORD: '${DB_PASSWORD:-postgres}'
|
|
volumes:
|
|
- 'sail-pgsql:/var/lib/postgresql/data'
|
|
networks:
|
|
- sail
|
|
|
|
redis:
|
|
image: 'redis:7-alpine'
|
|
ports:
|
|
- '${FORWARD_REDIS_PORT:-6379}:6379'
|
|
volumes:
|
|
- 'sail-redis:/data'
|
|
networks:
|
|
- sail
|
|
|
|
volumes:
|
|
sail-pgsql:
|
|
driver: local
|
|
sail-redis:
|
|
driver: local
|
|
|
|
networks:
|
|
sail:
|
|
driver: bridge
|