mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
modify nextjs deployment
This commit is contained in:
@@ -35,6 +35,27 @@
|
||||
12. Added deployment runbook:
|
||||
- `DEPLOYMENT.md`
|
||||
|
||||
## Passenger Web Migration to Next.js (Latest)
|
||||
|
||||
13. Passenger web apps migrated from Vite/SPA to Next.js:
|
||||
- Updated `apps/edr-passenger-web/portal/next.config.js` and `apps/edr-passenger-web/backoffice/next.config.js`:
|
||||
- Removed `output: 'export'` to enable server mode
|
||||
- Preserved `transpilePackages` for @edr/* shared packages
|
||||
14. Created dedicated Next.js Dockerfile:
|
||||
- `infrastructure/docker/Dockerfile.passenger-web`
|
||||
- Uses Node.js server (not nginx) for better Next.js support
|
||||
- Builds with turbo, deploys with `.next/standalone` server
|
||||
- Accepts build args: `APP_PACKAGE`, `APP_PATH`, `PORT`, `NEXT_PUBLIC_API_URL`
|
||||
15. Updated docker-compose.yaml:
|
||||
- `passenger-portal` and `passenger-backoffice` now use `infrastructure/docker/Dockerfile.passenger-web`
|
||||
- Port mappings changed from container:80 to container:5174/5184 (Next.js actual ports)
|
||||
- Updated build args to match new Dockerfile
|
||||
- Changed env var from `PASSENGER_VITE_API_URL` to `PASSENGER_NEXT_PUBLIC_API_URL`
|
||||
16. Updated DEPLOYMENT.md:
|
||||
- Added "Passenger Web Docker Configuration" section
|
||||
- Documented differences between freight-web (Vite+nginx) and passenger-web (Next.js+Node.js)
|
||||
- Updated build env file example to use `PASSENGER_NEXT_PUBLIC_API_URL`
|
||||
|
||||
## Key Files to Review
|
||||
|
||||
- `.github/workflows/deploy.yml`
|
||||
@@ -43,7 +64,10 @@
|
||||
- `scripts/deploy/create-npmrc.sh`
|
||||
- `apps/edr-passenger-api/docker-entrypoint.sh`
|
||||
- `apps/edr-passenger-api/prisma/seed.ts`
|
||||
- `DEPLOYMENT.md`
|
||||
- `infrastructure/docker/Dockerfile.passenger-web` (NEW)
|
||||
- `apps/edr-passenger-web/portal/next.config.js` (MODIFIED)
|
||||
- `apps/edr-passenger-web/backoffice/next.config.js` (MODIFIED)
|
||||
- `DEPLOYMENT.md` (MODIFIED)
|
||||
|
||||
## Next Actions
|
||||
|
||||
@@ -60,4 +84,9 @@
|
||||
2. Prisma warns about `package.json#prisma` deprecation (Prisma 7 migration pending).
|
||||
3. Matrix parallelism increases runner load; ensure self-hosted runner capacity is sufficient.
|
||||
4. Port collisions are prevented by env-driven mapping, but bad env values can still cause runtime conflicts.
|
||||
5. Passenger web now uses Next.js server mode (not static export):
|
||||
- Requires Node.js at runtime (previously could use pure static hosting)
|
||||
- Deployment must ensure `PASSENGER_NEXT_PUBLIC_API_URL` is set in build env for production deployments
|
||||
- Each portal/backoffice instance runs its own Node.js process (watch container memory usage)
|
||||
6. Freight web still uses Vite+nginx (different from passenger web) — maintain both Dockerfiles separately
|
||||
|
||||
|
||||
Reference in New Issue
Block a user