skillhub/.env.release.draft
XiaoSeS 56f3c6b669 feat(deploy): enable handover and ownership conversion in release manifests
The two switches were only reachable as application properties defaulting
to false, so a release deployment shipped the feature inert. Turn them on
in the release Compose file, the Helm chart and the k8s base, keep the
application defaults unchanged, and document the override.

The k8s base config map gains both keys, the chart exposes
server.handoverEnabled / server.ownershipConversionEnabled and validates
them, and the release validator now rejects non-boolean values.

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-12-03 17:06:37 +08:00

149 lines
5.9 KiB
Text

# SkillHub production draft for bare-metal deployment.
# Copy this to .env.release and replace every value marked TODO.
#
# Recommended workflow:
# 1. cp .env.release.draft .env.release
# 2. Edit TODO values
# 3. make validate-release-config
# 4. docker compose --env-file .env.release -f compose.release.yml up -d
# Pin a released image tag in production.
SKILLHUB_VERSION=v0.1.0-beta.5
SKILLHUB_SERVER_IMAGE=ghcr.io/iflytek/skillhub-server
SKILLHUB_WEB_IMAGE=ghcr.io/iflytek/skillhub-web
# Public HTTPS entrypoint, no trailing slash.
SKILLHUB_PUBLIC_BASE_URL=https://skillhub.example.com
# Usually keep empty when web and api are served from the same domain.
SKILLHUB_WEB_API_BASE_URL=
SKILLHUB_API_UPSTREAM=http://server:8080
# Enable only when a trusted TLS-terminating proxy replaces X-Forwarded-Proto
# and the web container cannot be reached directly.
SKILLHUB_TRUST_FORWARDED_PROTO=false
# Keep database and redis local-only on the host unless you explicitly need remote access.
POSTGRES_BIND_ADDRESS=127.0.0.1
POSTGRES_PORT=5432
POSTGRES_DB=skillhub
POSTGRES_USER=skillhub
POSTGRES_PASSWORD=TODO_change_to_a_strong_database_password
REDIS_BIND_ADDRESS=127.0.0.1
REDIS_PORT=6379
# Optional external Redis Cluster. Leave commented to use bundled standalone Redis.
# All advertised node addresses must be reachable from the server container.
# SPRING_DATA_REDIS_CLUSTER_NODES=redis-0.example.com:6379,redis-1.example.com:6379,redis-2.example.com:6379
# SPRING_DATA_REDIS_CLUSTER_MAX_REDIRECTS=5
# SPRING_DATA_REDIS_USERNAME=
# SPRING_DATA_REDIS_PASSWORD=
# SPRING_DATA_REDIS_SSL_ENABLED=true
# SPRING_DATA_REDIS_CONNECT_TIMEOUT=5s
# SPRING_DATA_REDIS_TIMEOUT=3s
# SPRING_DATA_REDIS_CLIENT_NAME=skillhub
# Optional external Redis Sentinel. Sentinel takes precedence if both Sentinel
# and Cluster settings are present.
# SPRING_DATA_REDIS_SENTINEL_MASTER=mymaster
# SPRING_DATA_REDIS_SENTINEL_NODES=sentinel-0.example.com:26379,sentinel-1.example.com:26379,sentinel-2.example.com:26379
# SPRING_DATA_REDIS_SENTINEL_USERNAME=
# SPRING_DATA_REDIS_SENTINEL_PASSWORD=
# SKILLHUB_REDIS_SENTINEL_CHECK_SENTINELS_LIST=true
# Host ports exposed by the app containers.
API_PORT=8080
WEB_PORT=80
# Must stay true when the public site is behind HTTPS.
SESSION_COOKIE_SECURE=true
# Built-in starter skills are installed by default. Set to false to skip initialization.
SKILLHUB_BUILTIN_SKILLS_ENABLED=true
# Skill handover and the conversion of responsibilities recorded when a member leaves.
# Handover works only in a browser session; API tokens are refused. Turning conversion off
# still records affected Skills and keeps the temporary restriction, it only stops conversion.
SKILLHUB_HANDOVER_ENABLED=true
SKILLHUB_OWNERSHIP_CONVERSION_ENABLED=true
# External object storage. Production should use s3.
SKILLHUB_STORAGE_PROVIDER=s3
# Fill with your real S3-compatible endpoint.
# Aliyun OSS example:
# https://oss-cn-shanghai.aliyuncs.com
# AWS S3 example:
# https://s3.ap-east-1.amazonaws.com
# MinIO example:
# https://minio.example.com
SKILLHUB_STORAGE_S3_ENDPOINT=https://oss-cn-shanghai.aliyuncs.com
# Optional public endpoint for presigned download URLs.
# Leave empty if the same endpoint is externally reachable.
SKILLHUB_STORAGE_S3_PUBLIC_ENDPOINT=
SKILLHUB_STORAGE_S3_BUCKET=skillhub-prod
# Set both static keys, or leave both empty to use the deployment's IAM credentials.
SKILLHUB_STORAGE_S3_ACCESS_KEY=TODO_fill_real_access_key
SKILLHUB_STORAGE_S3_SECRET_KEY=TODO_fill_real_secret_key
SKILLHUB_STORAGE_S3_REGION=cn-shanghai
# Aliyun OSS / AWS S3 typically use false.
# Many self-hosted MinIO deployments need true.
SKILLHUB_STORAGE_S3_FORCE_PATH_STYLE=false
# Keep false in production unless you intentionally want the app to create the bucket.
SKILLHUB_STORAGE_S3_AUTO_CREATE_BUCKET=false
SKILLHUB_STORAGE_S3_PRESIGN_EXPIRY=PT10M
# Set true for storage providers such as Aliyun OSS that reject aws-chunked uploads.
SKILLHUB_STORAGE_S3_DISABLE_CHUNKED_ENCODING=false
# Optional public GitHub Skill sync. Keep the github-sync Compose profile disabled
# until Java and Go have the same random service token (at least 32 characters).
# For S3, set a positive staging prefix budget and allow the internal presigned PUT host.
SKILLHUB_GITHUB_SYNC_STAGING_CAPACITY_LIMIT_BYTES=0
SKILLHUB_GITHUB_SYNC_SERVICE_TOKEN=
SKILLHUB_GITHUB_SYNC_SERVICE_TOKENS=
SKILLHUB_GITHUB_SYNC_ALLOWED_S3_HOSTS=
# Optional system GitHub credential pool: v1=<Base64-encoded 32-byte key>.
# Leave both blank for anonymous public API access.
SKILLHUB_GITHUB_SYNC_CREDENTIAL_KEYS=
SKILLHUB_GITHUB_SYNC_ACTIVE_CREDENTIAL_KEY_VERSION=
# Outbound GitHub proxy only; Java control-plane and staging PUT remain direct.
SKILLHUB_GITHUB_SYNC_HTTP_PROXY=
SKILLHUB_GITHUB_SYNC_HTTPS_PROXY=
SKILLHUB_GITHUB_SYNC_NO_PROXY=
# Bootstrap admin is only for first login / first bootstrap.
BOOTSTRAP_ADMIN_ENABLED=true
BOOTSTRAP_ADMIN_USER_ID=docker-admin
BOOTSTRAP_ADMIN_USERNAME=admin
BOOTSTRAP_ADMIN_PASSWORD=TODO_change_to_a_strong_admin_password
BOOTSTRAP_ADMIN_DISPLAY_NAME=Platform Admin
BOOTSTRAP_ADMIN_EMAIL=admin@example.com
# Usually keep empty and let the backend derive it from SKILLHUB_PUBLIC_BASE_URL.
DEVICE_AUTH_VERIFICATION_URI=
# Optional GitHub OAuth.
# Leave both empty if you are not enabling GitHub login yet.
OAUTH2_GITHUB_CLIENT_ID=
OAUTH2_GITHUB_CLIENT_SECRET=
# SMTP configuration for password reset verification emails.
SPRING_MAIL_HOST=smtp.example.com
SPRING_MAIL_PORT=587
SPRING_MAIL_USERNAME=TODO_fill_smtp_username
SPRING_MAIL_PASSWORD=TODO_fill_smtp_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
# Required for signing anonymous download rate-limit cookies. Use a unique random value per deployment.
SKILLHUB_DOWNLOAD_ANON_COOKIE_SECRET=replace-with-random-download-secret-32-bytes