mirror of
https://github.com/SecurityCrux/secrux-web.git
synced 2026-04-26 18:25:53 +03:00
No description
|
|
||
|---|---|---|
| .github/workflows | ||
| docker | ||
| public | ||
| src | ||
| .env.example | ||
| .gitignore | ||
| docker-compose.yml | ||
| Dockerfile | ||
| env.example | ||
| eslint.config.js | ||
| index.html | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.js | ||
| README.md | ||
| README.zh-CN.md | ||
| tailwind.config.cjs | ||
| tailwind.config.ts | ||
| tsconfig.app.json | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||
Secrux Console
secrux-console is the Vite + React web UI for the Secrux platform.
Development requirements
- Node.js 20+
- npm (or compatible)
Local development
cd secrux-console
npm install
npm run dev
Configure API / OIDC via Vite env (see env.example), for example:
VITE_API_BASE_URL=http://localhost:8080VITE_OIDC_BASE_URL=http://localhost:8081
Deployment (Nginx container)
Production deploy uses the provided Dockerfile to build the static site and serve it with an independent Nginx container.
Runtime config is injected at container startup by writing /env-config.js and exposing it to the app
(index.html loads it before the main bundle). Configure with environment variables:
SECRUX_API_BASE_URLSECRUX_AUTH_MODE_UI(orSECRUX_AUTH_MODE)SECRUX_OIDC_BASE_URL,SECRUX_OIDC_REALM,SECRUX_OIDC_CLIENT_ID,SECRUX_OIDC_SCOPESECRUX_APP_VERSION
Standalone deploy (Docker Compose)
cd secrux-console
cp .env.example .env
docker compose up -d
docker compose ps
Default URL: http://localhost:5173
Configuration reference
Local dev (Vite env)
These are compile-time variables used by npm run dev / npm run build (see env.example):
VITE_API_BASE_URL: Secrux Server API base URL (browser-facing).VITE_AUTH_MODE: UI auth mode (keycloakorlocal).VITE_OIDC_BASE_URL,VITE_OIDC_REALM,VITE_OIDC_CLIENT_ID,VITE_OIDC_SCOPE: OIDC settings for Keycloak.VITE_APP_VERSION: Optional version string shown in the UI.
Container runtime (Nginx)
These are injected into /env-config.js at container start:
CONSOLE_PORT: Host port mapped to the Nginx container:80(used bydocker-compose.yml).SECRUX_API_BASE_URL: API base URL for users’ browsers.SECRUX_AUTH_MODE_UI: UI auth mode (keycloakorlocal). Fallback:SECRUX_AUTH_MODE.SECRUX_OIDC_BASE_URL,SECRUX_OIDC_REALM,SECRUX_OIDC_CLIENT_ID,SECRUX_OIDC_SCOPE: OIDC settings.SECRUX_APP_VERSION: Version string.