Files
syops/backend/.env.production.example
T

95 lines
4.3 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# hxops backend — template for secrets / local Flask (optional).
#
# Jenkins / docker-compose 部署时,真正被加载的是「仓库根目录」的 .env.prod / .env.dev
#(见 scripts/deploy_compose.sh 与 docker-compose.yml 里 hxops-backend.env_file)。
# 本文件仅作字段说明;可复制关键项到根目录 .env.prod,或复制到服务器上的 backend/.env(挂载进容器,供 dotenv 与后台持久化配置)。
# -----------------------------------------------------------------------------
# Core
# -----------------------------------------------------------------------------
SECRET_KEY=replace-with-strong-random-secret
DATABASE_URL=postgresql://<db_user>:<db_password>@<db_host>:5432/<db_name>
# -----------------------------------------------------------------------------
# Dify
# -----------------------------------------------------------------------------
DIFY_API_BASE=https://api.dify.ai/v1
DIFY_API_KEY=replace-with-default-dify-api-key
# -----------------------------------------------------------------------------
# Redis
# -----------------------------------------------------------------------------
REDIS_URL=redis://:<redis_password>@<redis_host>:6379/0
# -----------------------------------------------------------------------------
# Feature switches
# -----------------------------------------------------------------------------
FEEDBACK_ENABLED=true
# -----------------------------------------------------------------------------
# Optional integrations
# -----------------------------------------------------------------------------
HR_WORKFLOW_IFRAME_URL=https://<your-hr-workflow-url>
HR_WORKFLOW_API_BASE=https://<your-hr-workflow-api-base>
HR_WORKFLOW_API_KEY=
INTEGRATION_API_BASE=https://<your-integration-api-base>
INTEGRATION_API_KEY=
# -----------------------------------------------------------------------------
# WeCom OAuth
# -----------------------------------------------------------------------------
WECOM_ENABLED=true
WECOM_CORP_ID=wwxxxxxxxxxxxxxxxx
WECOM_AGENT_ID=1000001
WECOM_SECRET=replace-with-wecom-app-secret
WECOM_REDIRECT_URI=https://<your-domain>/workspace
# Optional: public HTTPS origin for WeCom console URLs (admin copy helper). Overrides notify base and request host when set.
WECOM_PUBLIC_BASE_URL=https://<your-domain>
# Login strategy:
# - Match existing local account first.
# - If no match, block login and require admin provision/binding.
WECOM_AUTO_CREATE_USER=false
WECOM_MATCH_RULES=employee_id,mobile
WECOM_MATCH_OPERATOR=AND
# Employee id source options:
# - userid (default)
# - extattr:<name> (from WeCom custom attributes)
# - any direct field name returned by user/get
WECOM_EMPLOYEE_ID_SOURCE=userid
WECOM_MOBILE_NORMALIZE=true
WECOM_CALLBACK_TOKEN=
WECOM_ENCODING_AES_KEY=
WECOM_CALLBACK_URL=https://<your-domain>/api/user/wecom/callback
WECOM_HOMEPAGE_URL=https://<your-domain>/workspace
WECOM_TRUSTED_DOMAIN=<your-domain>
# WeCom notify/deeplink
WECOM_NOTIFY_ENABLED=true
WECOM_NOTIFY_BASE_URL=https://<your-domain>
WECOM_NOTIFY_EVENTS=permission_request_approved,permission_request_rejected,permission_batch_updated,task_completed
# -----------------------------------------------------------------------------
# Casdoor (password + OAuth). When frontend auth.wecom.loginViaCasdoor=true, WeCom login uses Casdoor only.
# -----------------------------------------------------------------------------
# Casdoor 控制台地址
CASDOOR_BASE_URL=http://192.168.100.230:8870
CASDOOR_CLIENT_ID=<application-client-id>
CASDOOR_CLIENT_SECRET=<application-secret>
# 兜底 redirect_uri;实际登录会以浏览器地址为准,以下两条都要在 Casdoor Application → Redirect URLs 里添加:
# http://192.168.100.230:8881/casdoor-callback
# http://ai.well-trust.com:8881/casdoor-callback
CASDOOR_REDIRECT_URI=http://192.168.100.230:8881/casdoor-callback
CASDOOR_SCOPE=openid profile email
# Provider「Name」与 Casdoor 控制台一致(示例:Name=wecom,Display name=企业微信,Organization=organization_HX)
CASDOOR_WECOM_PROVIDER_HINT=wecom
# Optional: append silentSignin=1 on authorize URL (Casdoor version dependent).
CASDOOR_WECOM_SILENT_SIGNIN=false
AUTH_JWT_ISSUER=http://192.168.100.230:8870
AUTH_JWT_AUDIENCE=<same-as-client-id-or-as-configured>
AUTH_JWT_JWKS_URL=http://192.168.100.230:8870/.well-known/jwks