-
Notifications
You must be signed in to change notification settings - Fork 112
feat(app): support legacy env variables and adapt to new settings object #818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sealday
wants to merge
11
commits into
main
Choose a base branch
from
chore/compatible-settings2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
fb2ac07
chore: add input env file
sealday 1618bba
Merge remote-tracking branch 'origin/main' into chore/compatible-sett…
sealday b8f6b21
Merge remote-tracking branch 'origin/main' into chore/compatible-sett…
sealday 7c51d19
Merge remote-tracking branch 'origin/main' into chore/compatible-sett…
sealday f34fa2b
Merge remote-tracking branch 'origin/main' into chore/compatible-sett…
sealday 48f036d
Merge remote-tracking branch 'origin/main' into chore/compatible-sett…
sealday 7cdbb63
Merge remote-tracking branch 'origin/main' into chore/compatible-sett…
sealday 6be36b3
Merge remote-tracking branch 'origin/main' into chore/compatible-sett…
sealday 797adae
Merge remote-tracking branch 'origin/main' into chore/compatible-sett…
sealday 0f5d8a5
feat: convert old env to settings object
sealday e1829df
fix: settings
sealday File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| ################# TACHYBASE APPLICATION ################# | ||
| APP_ENV=development | ||
| APP_PORT=3000 | ||
| APP_KEY=test-key | ||
|
|
||
| # experimental support | ||
| EXTENSION_UI_BASE_PATH=/adapters/ | ||
|
|
||
| API_BASE_PATH=/api/ | ||
| API_BASE_URL= | ||
|
|
||
| # console | file | dailyRotateFile | ||
| LOGGER_TRANSPORT= | ||
| LOGGER_BASE_PATH=storage/logs | ||
| # error | warn | info | debug | ||
| LOGGER_LEVEL= | ||
| # If LOGGER_TRANSPORT is dailyRotateFile and using days, add 'd' as the suffix. | ||
| LOGGER_MAX_FILES= | ||
| # add 'k', 'm', 'g' as the suffix. | ||
| LOGGER_MAX_SIZE= | ||
| # json | splitter, split by '|' character | ||
| LOGGER_FORMAT= | ||
|
|
||
| ################# DATABASE ################# | ||
|
|
||
| DB_DIALECT=sqlite | ||
| DB_STORAGE=storage/db/tachybase.sqlite | ||
| DB_TABLE_PREFIX= | ||
| # DB_HOST=localhost | ||
| # DB_PORT=5432 | ||
| # DB_DATABASE=postgres | ||
| # DB_USER=tachybase | ||
| # DB_PASSWORD=tachybase | ||
| # DB_LOGGING=on | ||
| # DB_UNDERSCORED=false | ||
|
|
||
| #== SSL CONFIG ==# | ||
| # DB_DIALECT_OPTIONS_SSL_CA= | ||
| # DB_DIALECT_OPTIONS_SSL_KEY= | ||
| # DB_DIALECT_OPTIONS_SSL_CERT= | ||
| # DB_DIALECT_OPTIONS_SSL_REJECT_UNAUTHORIZED=true | ||
|
|
||
| ################# CACHE ################# | ||
| CACHE_DEFAULT_STORE=memory | ||
| # max number of items in memory cache | ||
| CACHE_MEMORY_MAX=2000 | ||
| # CACHE_REDIS_URL= | ||
|
|
||
| ################# STORAGE (Initialization only) ################# | ||
|
|
||
| INIT_APP_LANG=en-US | ||
| INIT_ROOT_EMAIL=admin@tachybase.com | ||
| INIT_ROOT_PASSWORD=!Admin123. | ||
| INIT_ROOT_NICKNAME=Super Admin | ||
| INIT_ROOT_USERNAME=tachybase | ||
|
|
||
|
Comment on lines
+51
to
+56
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Root account credentials exposed
🤖 Prompt for AI Agents |
||
| ################# ENCRYPTION FIELD ################# | ||
|
|
||
| ENCRYPTION_FIELD_KEY= | ||
|
|
||
| ################# TELEMETRY ################# | ||
|
|
||
| # TELEMETRY_ENABLED=on # 是否启用后端遥测 | ||
| # TELEMETRY_SERVICE_NAME=tachybase-default-demo # 服务名称,默认为 tachybase-main | ||
| # OTEL_LOG_LEVEL=debug # OpenTelemetry 日志级别,仅输出到控制台,见 https://open-telemetry.github.io/opentelemetry-js/enums/_opentelemetry_api.DiagLogLevel.html ,不配置则默认不输出日志 | ||
| # OTEL_METRICS_READER=console,prometheus # 指标读取器,两个均为内置,console 为控制台,prometheus 为 prometheus 服务器 | ||
| # OTEL_PROMETHEUS_SERVER=on # 是否启用 Prometheus 服务,用于创建服务器以供导出指标数据 | ||
| # OTEL_PROMETHEUS_PORT=9464 # Prometheus 服务器端口,默认为 9464,注意此服务器没有鉴权 | ||
| # OTEL_TRACES_PROCESSOR=console,otlp # 链路追踪处理器,两个均为内置,console 为控制台,otlp 为 OTLP 规范的追踪服务器 | ||
| # OTEL_EXPORTER_OTLP_TRACES_ENDPOINT_GRPC=http://localhost:4317 # OTLP https://opentelemetry.io/docs/specs/otlp/ 规范的追踪服务器的 gRPC 端点地址 | ||
| # 下面为前端 Sentry 跟踪配置,注意修改后需要重新 build 前端代码 | ||
| # SENTRY_DSN= # Sentry DSN,用于前端遥测,留空则不启用前端遥测 | ||
| # SENTRY_TRACE_ENABLE=on # 是否启用 Sentry 跟踪,文档 https://docs.sentry.io/platforms/javascript/guides/react/tracing/ | ||
| # SENTRY_TRACE_SAMPLE_RATE=1.0 # Sentry 跟踪采样率,1.0 为 100%,0.0 为 0%,默认为 1.0 | ||
| # SENTRY_TRACE_PROPAGATION_TARGETS=localhost,/^\// # Sentry 跟踪传播目标过滤器,多个用逗号分隔,支持正则,默认为 localhost,/^\// ,文档 https://docs.sentry.io/platforms/javascript/tracing/instrumentation/automatic-instrumentation/#tracepropagationtargets | ||
| # SENTRY_SESSION_REPLAY_ENABLE=on # 是否启用 Sentry 会话重放,文档 https://docs.sentry.io/platforms/javascript/guides/react/session-replay/ | ||
| # SENTRY_SESSION_REPLAY_SAMPLE_RATE=0.1 # Sentry 会话重放采样率,1.0 为 100%,0.0 为 0%,默认为 0.1 | ||
| # SENTRY_SESSION_REPLAY_ONERROR_SAMPLE_RATE=1.0 # Sentry 会话重放错误采样率,1.0 为 100%,0.0 为 0%,默认为 1.0 | ||
|
|
||
| ##### PRESETS ##### | ||
|
|
||
| # 单写名称:添加指定插件且默认启用 名称前加!:移除指定插件 名称前加|:添加指定插件但默认禁用 | ||
| # PRESETS_CORE_PLUGINS=api-doc,api-keys,!messages | ||
| # PRESETS_LOCAL_PLUGINS=gantt,!iframe-block,|audit-logs | ||
| PRESETS_BULTIN_PLUGINS=acl,app-info,auth,backup,cloud-component,collection,cron,data-source,error-handler,event-source,file,workflow,message,pdf,ui-schema,user,web,worker-thread,env-secrets | ||
| PRESETS_EXTERNAL_PLUGINS=action-bulk-edit,action-bulk-update,action-custom-request,action-duplicate,action-export,action-import,action-print,block-calendar,block-charts,block-gantt,block-kanban,block-presentation,field-china-region,field-formula,field-sequence,field-encryption,log-viewer,otp,instrumentation,full-text-search,password-policy,auth-pages,manual-notification,auth-main-app,!adapter-bullmq,!adapter-red-node,!adapter-remix,!api-keys,!audit-logs,!auth-cas,!auth-dingtalk,!auth-lark,!auth-oidc,!auth-saml,!auth-sms,!auth-wechat,!auth-wecom,!block-comments,!block-map,!block-step-form,!data-source-common,!demos-game-runesweeper,!devtools,!field-markdown-vditor,!field-snapshot,!hera,!i18n-editor,!multi-app,!multi-app-share-collection,!online-user,!simple-cms,!sub-accounts,!theme-editor,!workflow-approval,!ai-chat,!department,!workflow-analysis,!api-logs,!ocr-convert,!text-copy,!user-manual-feishu,!evaluator-mathjs | ||
|
|
||
|
|
||
| # 主应用工作线程默认数量 | ||
| WORKER_COUNT=1 | ||
| # WORKER_TIMEOUT=1800 | ||
| # 主应用工作线程最大数量 | ||
| WORKER_COUNT_MAX=8 | ||
| # WORKER_ERROR_RETRY=3 | ||
| # 子应用工作线程默认数量 | ||
| WORKER_COUNT_SUB=0 | ||
| # 子应用工作线程最大数量 | ||
| WORKER_COUNT_MAX_SUB=1 | ||
|
|
||
| # export config, max length of export data to use main thread and page size in worker thread | ||
| # EXPORT_LENGTH_MAX=2000 | ||
| # EXPORT_WORKER_PAGESIZE=1000 | ||
|
|
||
| # 开发环境测试locale 强制使用 cache | ||
| #FORCE_LOCALE_CACHE=1 | ||
|
|
||
| # 禁止子应用装载的插件,多个用逗号分隔 | ||
| # FORBID_SUB_APP_PLUGINS=multi-app,manual-notification,multi-app-share-collection | ||
|
|
||
|
|
||
| # 工作线程最大内存,单位为MB | ||
| # WORKER_MAX_MEMORY=4096 | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard-coded secret committed
APP_KEYcontains a real-looking key. Even in test fixtures, commit history persists and may leak into production workflows. Replace with an obvious placeholder (e.g.CHANGE_ME) or load from CI secrets.🤖 Prompt for AI Agents