Serve compliance-portal instead of trust

Embed and build @probo/compliance-portal for the
/trust path and custom-domain SPA so production
ships the v2 portal. Keep apps/trust in the repo
for local use on port 5175; portal takes 5174.

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-07-20 17:38:45 +02:00
parent 70d0424022
commit 26595b724f
18 changed files with 96 additions and 60 deletions

View File

@@ -28,7 +28,7 @@ import (
"io/fs"
"net/http"
truststatics "go.probo.inc/probo/apps/trust"
complianceportalstatics "go.probo.inc/probo/apps/compliance-portal"
"go.probo.inc/probo/pkg/server/statichandler"
)
@@ -59,7 +59,7 @@ func NewServer(headDataFunc HeadDataFunc) (*Server, error) {
}
spaServer, err := statichandler.NewServer(
truststatics.StaticFiles,
complianceportalstatics.StaticFiles,
"dist",
gzipOptions,
statichandler.WithFileRenderer("/index.html", renderer),
@@ -72,7 +72,7 @@ func NewServer(headDataFunc HeadDataFunc) (*Server, error) {
}
func buildIndexRenderer(headDataFunc HeadDataFunc) (statichandler.FileRenderer, error) {
subFS, err := fs.Sub(truststatics.StaticFiles, "dist")
subFS, err := fs.Sub(complianceportalstatics.StaticFiles, "dist")
if err != nil {
return nil, fmt.Errorf("cannot open dist: %w", err)
}