feat: complete 2.0.7.12 platform overhaul
This commit is contained in:
@@ -2,6 +2,12 @@
|
||||
|
||||
This service unifies the old `server/update` and `server/feedback-mailer` projects.
|
||||
|
||||
## Nginx Reverse Proxy
|
||||
|
||||
Production deployments should start from `deploy/nginx/unified-management.conf.example`. Set its domain, TLS settings, upstream port, and `/downloads/` alias for the current machine. Keep `client_max_body_size` at least 8 MiB above `YMHUT_RELEASE_UPLOAD_MAX_BYTES` for multipart overhead; the default service limit is 1 GiB.
|
||||
|
||||
The upload location disables request buffering so packages stream directly to Go and uses a 30-minute timeout. The download location lets Nginx send immutable package files without routing their bytes through the service. Run `nginx -t` before reloading a control-panel generated configuration.
|
||||
|
||||
## What It Provides
|
||||
|
||||
- Go backend with SQLite by default.
|
||||
@@ -54,26 +60,29 @@ $env:YMHUT_GOPROXY="https://your-proxy.example,direct"
|
||||
|
||||
## Frontend Build Check
|
||||
|
||||
Startup preflight checks both built web apps:
|
||||
Startup preflight checks the selected admin asset source and both other built web apps. The admin build must include:
|
||||
|
||||
- `web/admin/dist/index.html`
|
||||
- `web/admin/dist/assets`
|
||||
- `web/admin/dist/asset-manifest.json`
|
||||
- `web/admin/dist/admin-build.json`
|
||||
- every entry, CSS file, asset, import, and dynamic import named by the manifest
|
||||
- `web/portal/dist/index.html`
|
||||
- `web/portal/dist/assets`
|
||||
|
||||
If either frontend is missing, the service still starts, but the preflight log tells you to run the frontend build. Release binaries built with `embed_web` report that embedded frontend assets are being used instead. Build the local dist files with:
|
||||
Release binaries built with `embed_web` default to the embedded admin build and never mix it with files from disk. Non-embedded development builds default to disk. Override this explicitly with `YMHUT_ADMIN_ASSET_MODE=embedded|disk`; an invalid or incomplete selected source is reported through `/api/admin/system/health` and is not replaced by files from the other source. Build the local dist files with:
|
||||
|
||||
```powershell
|
||||
cd server\unified-management\web\admin
|
||||
npm install
|
||||
npm run build
|
||||
npm run validate:build
|
||||
|
||||
cd ..\portal
|
||||
npm install
|
||||
npm run build
|
||||
```
|
||||
|
||||
The Go server serves portal assets from `/assets/*` and admin assets from `/admin/assets/*`. Disk `dist` files are preferred during development; embedded assets are used as the release fallback.
|
||||
The Go server serves portal assets from `/assets/*` and admin assets from `/admin/assets/*`. Admin HTML is always `no-store`, hashed assets are immutable, and missing assets return 404 rather than the SPA shell. Production deployment replaces the single embedded service binary; do not copy `web/admin/dist` over a production binary.
|
||||
|
||||
## Release Binaries
|
||||
|
||||
|
||||
Reference in New Issue
Block a user