No description
Find a file
2026-01-16 23:12:23 +11:00
.github/workflows feat: update Docker image tag handling and add step to set package visibility to public 2026-01-16 20:59:58 +11:00
docker first commit 2026-01-11 19:22:09 +11:00
public first commit 2026-01-11 19:22:09 +11:00
src feat: add GitHub Actions workflow for publishing Docker images and improve dark mode styles for code snippets 2026-01-16 19:35:55 +11:00
.env.example first commit 2026-01-11 19:22:09 +11:00
.gitignore first commit 2026-01-11 19:22:09 +11:00
docker-compose.yml first commit 2026-01-11 19:22:09 +11:00
Dockerfile first commit 2026-01-11 19:22:09 +11:00
env.example first commit 2026-01-11 19:22:09 +11:00
eslint.config.js first commit 2026-01-11 19:22:09 +11:00
index.html first commit 2026-01-11 19:22:09 +11:00
LICENSE first commit 2026-01-11 22:17:47 +11:00
package-lock.json first commit 2026-01-11 19:22:09 +11:00
package.json first commit 2026-01-11 19:22:09 +11:00
postcss.config.js first commit 2026-01-11 19:22:09 +11:00
README.md first commit 2026-01-11 19:22:09 +11:00
README.zh-CN.md first commit 2026-01-11 19:22:09 +11:00
tailwind.config.cjs first commit 2026-01-11 19:22:09 +11:00
tailwind.config.ts first commit 2026-01-11 19:22:09 +11:00
tsconfig.app.json first commit 2026-01-11 19:22:09 +11:00
tsconfig.json first commit 2026-01-11 19:22:09 +11:00
tsconfig.node.json first commit 2026-01-11 19:22:09 +11:00
vite.config.ts first commit 2026-01-11 19:22:09 +11:00

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:8080
  • VITE_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_URL
  • SECRUX_AUTH_MODE_UI (or SECRUX_AUTH_MODE)
  • SECRUX_OIDC_BASE_URL, SECRUX_OIDC_REALM, SECRUX_OIDC_CLIENT_ID, SECRUX_OIDC_SCOPE
  • SECRUX_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 (keycloak or local).
  • 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 by docker-compose.yml).
  • SECRUX_API_BASE_URL: API base URL for users browsers.
  • SECRUX_AUTH_MODE_UI: UI auth mode (keycloak or local). 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.