mirror of
https://github.com/iflytek/skillhub.git
synced 2026-09-09 22:31:14 +00:00
The web container's envsubst in 30-runtime-config.sh only substituted
SKILLHUB_WEB_API_BASE_URL and SKILLHUB_PUBLIC_BASE_URL, leaving auth-related
variables (authDirectEnabled, authSessionBootstrapEnabled, etc.) as literal
${...} strings in runtime-config.js. Additionally, compose.release.yml did not
pass SKILLHUB_WEB_AUTH_DIRECT_ENABLED or SKILLHUB_WEB_AUTH_DIRECT_PROVIDER to
the web container, nor SKILLHUB_AUTH_DIRECT_ENABLED to the server container.
This made it impossible to enable direct (username/password) authentication
for intranet deployments without OAuth2, even though the frontend template and
backend already supported it.
Changes:
- compose.release.yml: add SKILLHUB_AUTH_DIRECT_ENABLED to server env
- compose.release.yml: add auth direct and session bootstrap vars to web env
- 30-runtime-config.sh: expand envsubst to cover all runtime-config.js template variables
- .env.release.example: document the new auth configuration variables
All new variables default to false/empty, preserving existing GitHub OAuth behavior.
96 lines
3.5 KiB
Text
96 lines
3.5 KiB
Text
# `latest` tracks the latest stable release image.
|
|
# For deterministic environments, pin a release tag like `v0.1.0`.
|
|
# Use `edge` only when you explicitly want the latest build from `main`.
|
|
SKILLHUB_VERSION=latest
|
|
SKILLHUB_SERVER_IMAGE=ghcr.io/iflytek/skillhub-server
|
|
SKILLHUB_WEB_IMAGE=ghcr.io/iflytek/skillhub-web
|
|
SKILLHUB_SCANNER_IMAGE=ghcr.io/iflytek/skillhub-scanner
|
|
POSTGRES_IMAGE=postgres:16-alpine
|
|
REDIS_IMAGE=redis:7-alpine
|
|
|
|
# Public entrypoint seen by browsers/CLI, no trailing slash.
|
|
# Default to localhost so `runtime.sh up` works as a zero-config quickstart.
|
|
SKILLHUB_PUBLIC_BASE_URL=http://localhost
|
|
|
|
# Frontend usually keeps this empty and proxies to the backend through nginx.
|
|
SKILLHUB_WEB_API_BASE_URL=
|
|
SKILLHUB_API_UPSTREAM=http://server:8080
|
|
|
|
POSTGRES_BIND_ADDRESS=127.0.0.1
|
|
POSTGRES_PORT=5432
|
|
POSTGRES_DB=skillhub
|
|
POSTGRES_USER=skillhub
|
|
POSTGRES_PASSWORD=change-this-postgres-password
|
|
|
|
REDIS_BIND_ADDRESS=127.0.0.1
|
|
REDIS_PORT=6379
|
|
API_PORT=8080
|
|
WEB_PORT=80
|
|
SESSION_COOKIE_SECURE=false
|
|
|
|
# Zero-config runtime validation uses local storage.
|
|
# Switch to `s3` and fill the fields below before a real production deployment.
|
|
SKILLHUB_STORAGE_PROVIDER=local
|
|
SKILLHUB_STORAGE_S3_ENDPOINT=https://oss-cn-example.aliyuncs.com
|
|
SKILLHUB_STORAGE_S3_PUBLIC_ENDPOINT=
|
|
SKILLHUB_STORAGE_S3_BUCKET=skillhub-prod
|
|
SKILLHUB_STORAGE_S3_ACCESS_KEY=replace-me
|
|
SKILLHUB_STORAGE_S3_SECRET_KEY=replace-me
|
|
SKILLHUB_STORAGE_S3_REGION=cn-shanghai
|
|
SKILLHUB_STORAGE_S3_FORCE_PATH_STYLE=false
|
|
SKILLHUB_STORAGE_S3_AUTO_CREATE_BUCKET=false
|
|
SKILLHUB_STORAGE_S3_PRESIGN_EXPIRY=PT10M
|
|
|
|
# Bootstrap local admin account for first login. Rotate or disable after initial setup.
|
|
BOOTSTRAP_ADMIN_ENABLED=true
|
|
BOOTSTRAP_ADMIN_USER_ID=docker-admin
|
|
BOOTSTRAP_ADMIN_USERNAME=admin
|
|
BOOTSTRAP_ADMIN_PASSWORD=ChangeMe!2026
|
|
BOOTSTRAP_ADMIN_DISPLAY_NAME=Platform Admin
|
|
BOOTSTRAP_ADMIN_EMAIL=admin@example.com
|
|
|
|
# Optional override. Defaults to ${SKILLHUB_PUBLIC_BASE_URL}/device.
|
|
DEVICE_AUTH_VERIFICATION_URI=
|
|
|
|
# Optional: configure real GitHub OAuth before exposing the stack to other users.
|
|
OAUTH2_GITHUB_CLIENT_ID=
|
|
OAUTH2_GITHUB_CLIENT_SECRET=
|
|
|
|
# Optional: configure real GitLab OAuth before exposing the stack to other users.
|
|
# Set OAUTH2_GITLAB_BASE_URI to your self-hosted GitLab URL when applicable.
|
|
OAUTH2_GITLAB_CLIENT_ID=
|
|
OAUTH2_GITLAB_CLIENT_SECRET=
|
|
OAUTH2_GITLAB_BASE_URI=https://gitlab.com
|
|
OAUTH2_GITLAB_DISPLAY_NAME=GitLab
|
|
|
|
# SMTP configuration for password reset verification emails.
|
|
SPRING_MAIL_HOST=
|
|
SPRING_MAIL_PORT=587
|
|
SPRING_MAIL_USERNAME=
|
|
SPRING_MAIL_PASSWORD=
|
|
SPRING_MAIL_SMTP_AUTH=true
|
|
SPRING_MAIL_SMTP_STARTTLS_ENABLE=true
|
|
SPRING_MAIL_PROPERTIES_MAIL_SMTP_SSL_ENABLE=false
|
|
SPRING_MAIL_PROPERTIES_MAIL_SMTP_SSL_TRUST=
|
|
SKILLHUB_AUTH_PASSWORD_RESET_CODE_EXPIRY=PT10M
|
|
SKILLHUB_AUTH_PASSWORD_RESET_FROM_ADDRESS=noreply@example.com
|
|
SKILLHUB_AUTH_PASSWORD_RESET_FROM_NAME=SkillHub
|
|
|
|
# Direct (username/password) authentication. Enable for environments without OAuth2.
|
|
# Requires SKILLHUB_AUTH_DIRECT_ENABLED=true in server and matching frontend config below.
|
|
SKILLHUB_AUTH_DIRECT_ENABLED=false
|
|
SKILLHUB_WEB_AUTH_DIRECT_ENABLED=false
|
|
SKILLHUB_WEB_AUTH_DIRECT_PROVIDER=
|
|
|
|
# Enterprise SSO session bootstrap (e.g. header-based SSO proxy).
|
|
SKILLHUB_WEB_AUTH_SESSION_BOOTSTRAP_ENABLED=false
|
|
SKILLHUB_WEB_AUTH_SESSION_BOOTSTRAP_PROVIDER=
|
|
SKILLHUB_WEB_AUTH_SESSION_BOOTSTRAP_AUTO=false
|
|
|
|
# Security scanner is enabled by default. Set to false to disable scanning.
|
|
SKILLHUB_SECURITY_SCANNER_ENABLED=true
|
|
|
|
# Scanner LLM configuration (optional, for AI-powered scanning features)
|
|
SKILL_SCANNER_LLM_API_KEY=
|
|
SKILL_SCANNER_LLM_BASE_URL=
|
|
SKILL_SCANNER_LLM_MODEL=
|