diff --git a/portal/.env.example b/portal/.env.example new file mode 100644 index 0000000..f7fe259 --- /dev/null +++ b/portal/.env.example @@ -0,0 +1,16 @@ +# Copy to .env.local — never commit .env.local. + +# Public origin must match the browser URL (NPM host), not the LAN upstream IP. +# Apex: https://sankofa.nexus — or use https://portal.sankofa.nexus if that is your vhost. +NEXTAUTH_URL=https://sankofa.nexus +NEXTAUTH_SECRET=generate-with-openssl-rand-base64-32 + +KEYCLOAK_URL=https://keycloak.sankofa.nexus +KEYCLOAK_REALM=your-realm +KEYCLOAK_CLIENT_ID=portal-client +KEYCLOAK_CLIENT_SECRET=your-client-secret + +NEXT_PUBLIC_CROSSPLANE_API=https://crossplane-api.crossplane-system.svc.cluster.local +NEXT_PUBLIC_ARGOCD_URL=https://argocd.sankofa.nexus +NEXT_PUBLIC_GRAFANA_URL=https://grafana.sankofa.nexus +NEXT_PUBLIC_LOKI_URL=https://loki.monitoring.svc.cluster.local:3100 diff --git a/portal/README.md b/portal/README.md index 7bb844b..7f5ed5a 100644 --- a/portal/README.md +++ b/portal/README.md @@ -42,7 +42,7 @@ npm install ### Configuration -Copy `.env.example` to `.env.local` and configure: +Copy [`.env.example`](.env.example) to `.env.local` and configure: ```env KEYCLOAK_URL=https://keycloak.sankofa.nexus @@ -55,7 +55,8 @@ NEXT_PUBLIC_ARGOCD_URL=https://argocd.sankofa.nexus NEXT_PUBLIC_GRAFANA_URL=https://grafana.sankofa.nexus NEXT_PUBLIC_LOKI_URL=https://loki.monitoring.svc.cluster.local:3100 -NEXTAUTH_URL=https://portal.sankofa.nexus +# Must match the browser URL (NPM vhost), not the LAN upstream — e.g. https://sankofa.nexus +NEXTAUTH_URL=https://sankofa.nexus NEXTAUTH_SECRET=your-nextauth-secret ``` diff --git a/portal/src/app/api/auth/error/page.tsx b/portal/src/app/api/auth/error/page.tsx index 0415a5b..0b5fe0f 100644 --- a/portal/src/app/api/auth/error/page.tsx +++ b/portal/src/app/api/auth/error/page.tsx @@ -35,7 +35,7 @@ function AuthErrorContent() { Go Home Try Again diff --git a/portal/src/app/page.tsx b/portal/src/app/page.tsx index 4a25a82..3346357 100644 --- a/portal/src/app/page.tsx +++ b/portal/src/app/page.tsx @@ -10,9 +10,9 @@ export default function Home() { if (status === 'loading') { return ( -
Loading...
Please sign in to continue
++ Sankofa Phoenix +
+Sign in to open Nexus Console.
-- Development mode: Use any email/password -
+ {process.env.NODE_ENV === 'development' && ( ++ Development: use any email/password with your dev IdP configuration. +
+ )}