Supabase CLI config
运行supabase init
后会生成一个supabase/config.toml
文件。
您可以编辑此文件以更改本地运行项目的设置。修改后,需要先使用supabase stop
停止,再通过supabase start
重新启动才能使更改生效。
通用 Config
project_id
Name | Default | Required |
---|---|---|
project_id | None | true |
Description
用于区分同一主机上不同Supabase项目的字符串。运行supabase init
时默认为工作目录名称。
Auth Config
auth.enabled
auth.site_url
Name | Default | Required |
---|---|---|
auth.site_url | "http://localhost:3000" | false |
Description
您网站的基础URL。用于重定向白名单以及构建电子邮件中使用的URL。
See also
auth.additional_redirect_urls
Name | Default | Required |
---|---|---|
auth.additional_redirect_urls | ["https://localhost:3000"] | false |
Description
一个包含授权提供商在认证后允许重定向的_精确_URL列表。
See also
auth.jwt_expiry
Name | Default | Required |
---|---|---|
auth.jwt_expiry | 3600 | false |
Description
令牌有效期,以秒为单位。默认为3600秒(1小时),最大604,800秒(一周)。
See also
auth.enable_manual_linking
auth.enable_refresh_token_rotation
Name | Default | Required |
---|---|---|
auth.enable_refresh_token_rotation | true | false |
Description
如果禁用,刷新令牌将永不过期。
See also
auth.refresh_token_reuse_interval
Name | Default | Required |
---|---|---|
auth.refresh_token_reuse_interval | 10 | false |
Description
允许刷新令牌在过期后重复使用,时间间隔由指定的秒数决定。需要 enable_refresh_token_rotation = true。
See also
auth.rate_limit.email_sent
Name | Default | Required |
---|---|---|
auth.rate_limit.email_sent | 2 | false |
Description
每小时可发送的电子邮件数量。需要启用auth.email.smtp。
See also
auth.rate_limit.sms_sent
Name | Default | Required |
---|---|---|
auth.rate_limit.sms_sent | 30 | false |
Description
每小时可发送的短信数量。需要启用auth.sms。
See also
auth.rate_limit.anonymous_users
Name | Default | Required |
---|---|---|
auth.rate_limit.anonymous_users | 30 | false |
Description
每个IP地址每小时可进行的匿名登录次数。需要 enable_anonymous_sign_ins = true。
See also
auth.rate_limit.token_refresh
Name | Default | Required |
---|---|---|
auth.rate_limit.token_refresh | 150 | false |
Description
每个IP地址在5分钟间隔内可刷新的会话次数。
See also
auth.rate_limit.sign_in_sign_ups
Name | Default | Required |
---|---|---|
auth.rate_limit.sign_in_sign_ups | 30 | false |
Description
每个IP地址在5分钟间隔内可进行的注册和登录请求次数(不包括匿名用户)。
See also
auth.rate_limit.token_verifications
Name | Default | Required |
---|---|---|
auth.rate_limit.token_verifications | 30 | false |
Description
每个IP地址在5分钟间隔内可进行的OTP/魔法链接验证次数。
See also
auth.enable_signup
auth.enable_anonymous_sign_ins
auth.email.enable_signup
Name | Default | Required |
---|---|---|
auth.email.enable_signup | true | false |
Description
允许/禁止通过电子邮件注册新用户到您的项目。
See also
auth.email.double_confirm_changes
Name | Default | Required |
---|---|---|
auth.email.double_confirm_changes | true | false |
Description
若启用此选项,用户需同时在旧邮箱地址和新邮箱地址上确认任何邮箱更改。若禁用此选项,则仅需新邮箱地址进行确认。
See also
auth.email.enable_confirmations
Name | Default | Required |
---|---|---|
auth.email.enable_confirmations | false | false |
Description
如果启用,用户在登录前需要确认其电子邮件地址。
See also
auth.email.secure_password_change
Name | Default | Required |
---|---|---|
auth.email.secure_password_change | None | false |
Description
如果启用,用户在更改密码时需要提供当前密码。
See also
auth.email.max_frequency
Name | Default | Required |
---|---|---|
auth.email.max_frequency | 1m | false |
Description
两次邮件请求之间必须间隔的最短时间。 通过限制邮件发送频率来防止垃圾邮件。 示例值:"1m"(1分钟)、"1h"(1小时)、"24h"(24小时)
See also
auth.email.otp_length
auth.email.otp_exp
Name | Default | Required |
---|---|---|
auth.email.otp_exp | 300 | false |
Description
OTP验证码的过期时间(单位:秒)。 默认为300秒(5分钟)。
See also
auth.email.smtp.host
Name | Default | Required |
---|---|---|
auth.email.smtp.host | inbucket | false |
Description
SMTP服务器的主机名或IP地址。
auth.email.smtp.port
Name | Default | Required |
---|---|---|
auth.email.smtp.port | 2500 | false |
Description
SMTP服务器的端口号。
auth.email.smtp.user
Name | Default | Required |
---|---|---|
auth.email.smtp.user | None | false |
Description
用于SMTP服务器认证的用户名。
auth.email.smtp.pass
Name | Default | Required |
---|---|---|
auth.email.smtp.pass | None | false |
Description
用于SMTP服务器认证的密码。
auth.email.smtp.admin_email
Name | Default | Required |
---|---|---|
auth.email.smtp.admin_email | admin@email.com | false |
Description
应用程序发送邮件时使用的发件人邮箱。
auth.email.smtp.sender_name
Name | Default | Required |
---|---|---|
auth.email.smtp.sender_name | None | false |
Description
应用程序发送邮件时使用的发件人显示名称。
auth.email.template.<类型>.subject
Name | Default | Required |
---|---|---|
auth.email.template.type.subject | None | false |
Description
完整的邮件模板类型列表如下:
invite
邀请confirmation
确认recovery
恢复magic_link
魔法链接email_change
邮箱变更
See also
auth.email.template.<类型>.content_path
Name | Default | Required |
---|---|---|
auth.email.template.type.content_path | None | false |
Description
完整的邮件模板类型列表如下:
invite
confirmation
recovery
magic_link
email_change
See also
auth.sms.enable_signup
auth.sms.enable_confirmations
Name | Default | Required |
---|---|---|
auth.sms.enable_confirmations | false | false |
Description
如果启用,用户在登录前需要确认其电话号码。
See also
auth.sms.test_otp
Name | Default | Required |
---|---|---|
auth.sms.test_otp | None | false |
Description
使用预定义的电话号码到OTP的映射进行测试。
Usage
1[auth.sms.test_otp]
24152127777 = "123456"
See also
auth.sms.<provider>.enabled
Name | Default | Required |
---|---|---|
auth.sms.provider.enabled | false | false |
Description
使用外部短信服务提供商。完整提供商列表如下:
twilio
twilio_verify
messagebird
textlocal
vonage
See also
auth.sms.<twilio|twilio_verify>.account_sid
auth.sms.<twilio|twilio_verify>.message_service_sid
Name | Default | Required |
---|---|---|
auth.sms.twilio.message_service_sid | None | true |
Description
Twilio消息服务SID
See also
auth.sms.<twilio|twilio_verify>.auth_token
Name | Default | Required |
---|---|---|
auth.sms.twilio.auth_token | env(SUPABASE_AUTH_SMS_TWILIO_AUTH_TOKEN) | true |
Description
Twilio 认证令牌
请勿将您的 Twilio 认证令牌提交到 git 仓库。请改用环境变量替换。
See also
auth.sms.messagebird.originator
Name | Default | Required |
---|---|---|
auth.sms.messagebird.originator | None | true |
Description
MessageBird 发信号码
See also
auth.sms.messagebird.access_key
Name | Default | Required |
---|---|---|
auth.sms.messagebird.access_key | env(SUPABASE_AUTH_SMS_MESSAGEBIRD_ACCESS_KEY) | true |
Description
MessageBird访问密钥
请勿将您的MessageBird访问密钥提交到git。请改用环境变量替换。
See also
auth.sms.textlocal.sender
auth.sms.textlocal.api_key
Name | Default | Required |
---|---|---|
auth.sms.textlocal.api_key | env(SUPABASE_AUTH_SMS_TEXTLOCAL_API_KEY) | true |
Description
TextLocal API密钥
请勿将您的TextLocal API密钥提交到git。请改用环境变量替代。
See also
auth.sms.vonage.from
auth.sms.vonage.api_key
auth.sms.vonage.api_secret
Name | Default | Required |
---|---|---|
auth.sms.vonage.api_secret | env(SUPABASE_AUTH_SMS_VONAGE_API_SECRET) | true |
Description
Vonage API密钥
请勿将您的Vonage API密钥提交到git。请改用环境变量替换。
See also
auth.external.<provider>.enabled
Name | Default | Required |
---|---|---|
auth.external.provider.enabled | false | false |
Description
使用外部OAuth提供商。完整的提供商列表如下:
apple
azure
bitbucket
discord
facebook
github
gitlab
google
kakao
keycloak
linkedin_oidc
notion
twitch
twitter
slack_oidc
spotify
workos
zoom
See also
auth.external.<provider>.client_id
Name | Default | Required |
---|---|---|
auth.external.provider.client_id | None | true |
Description
外部OAuth提供商的客户端ID。
See also
auth.external.<provider>.secret
Name | Default | Required |
---|---|---|
auth.external.provider.secret | env(SUPABASE_AUTH_EXTERNAL_<PROVIDER>_SECRET) | true |
Description
外部OAuth提供商的客户端密钥。
切勿将OAuth提供商密钥提交到git。请改用环境变量替换。
See also
auth.external.<provider>.url
Name | Default | Required |
---|---|---|
auth.external.provider.url | None | false |
Description
用于构建请求授权和访问令牌URL的基础URL。适用于gitlab和keycloak。 对于gitlab,默认值为https://gitlab.com。对于keycloak,您需要将其设置为您的实例地址, 例如:https://keycloak.example.com/realms/myrealm。
See also
auth.external.<provider>.redirect_uri
Name | Default | Required |
---|---|---|
auth.external.provider.redirect_uri | None | false |
Description
OAuth2提供商将携带code和state值重定向至此URI。
See also
auth.external.<provider>.skip_nonce_check
Name | Default | Required |
---|---|---|
auth.external.provider.skip_nonce_check | None | false |
Description
在指定提供商的OIDC认证流程中禁用nonce验证。仅在客户端库无法正确处理nonce验证时启用。请注意,这会降低安全性,因为允许使用被盗ID令牌进行潜在的重放攻击。
See also
auth.hook.<hook_name>.enabled
Name | Default | Required |
---|---|---|
auth.hook.<hook_name>.enabled | false | false |
Description
启用认证钩子。hook_name
的可能值为:custom_access_token
、send_sms
、send_email
、mfa_verification_attempt
和password_verification_attempt
。
See also
auth.hook.<hook_name>.uri
Name | Default | Required |
---|---|---|
auth.hook.<hook_name>.uri | None | false |
Description
要调用的钩子URI。应为一个http或https函数,或采用以下形式的Postgres函数:pg-functions://<数据库>/<模式>/<函数名>
。例如:pg-functions://postgres/auth/custom-access-token-hook
。
See also
auth.hook.<hook_name>.secrets
Name | Default | Required |
---|---|---|
auth.hook.<hook_name>.secrets | None | false |
Description
使用HTTP钩子时配置。接受一个base64编码的逗号分隔值列表以支持密钥轮换。目前Supabase认证仅使用列表中的第一个值。
See also
auth.mfa.totp.enroll_enabled
Name | Default | Required |
---|---|---|
auth.mfa.totp.enroll_enabled | true | false |
Description
启用TOTP注册以支持多因素认证。
See also
auth.mfa.totp.verify_enabled
Name | Default | Required |
---|---|---|
auth.mfa.totp.verify_enabled | true | false |
Description
启用TOTP验证以实现多因素认证。
See also
auth.mfa.max_enrolled_factors
Name | Default | Required |
---|---|---|
auth.mfa.max_enrolled_factors | 10 | false |
Description
控制每个用户一次可注册的MFA因素数量。
See also
auth.mfa.phone.enroll_enabled
Name | Default | Required |
---|---|---|
auth.mfa.phone.enroll_enabled | false | false |
Description
启用电话注册以进行多因素认证。
See also
auth.mfa.phone.otp_length
Name | Default | Required |
---|---|---|
auth.mfa.phone.otp_length | 6 | false |
Description
使用电话多因素认证时发送的OTP代码长度
See also
auth.mfa.phone.max_frequency
Name | Default | Required |
---|---|---|
auth.mfa.phone.max_frequency | 10s | false |
Description
两次手机请求之间必须间隔的最短时间。 通过限制消息发送频率来防止垃圾信息。 示例值:"10秒"、"20秒"、"1分钟"
See also
auth.mfa.phone.otp_length
auth.mfa.phone.verify_enabled
Name | Default | Required |
---|---|---|
auth.mfa.phone.verify_enabled | false | false |
Description
启用手机验证以进行多因素认证。
See also
auth.mfa.web_authn.enroll_enabled
Name | Default | Required |
---|---|---|
auth.mfa.web_authn.enroll_enabled | false | false |
Description
启用WebAuthn注册以进行多因素认证。
See also
auth.mfa.web_authn.verify_enabled
Name | Default | Required |
---|---|---|
auth.mfa.web_authn.verify_enabled | false | false |
Description
启用WebAuthn验证以进行多因素认证。
See also
auth.sessions.timebox
Name | Default | Required |
---|---|---|
auth.sessions.timebox | None | false |
Description
在指定持续时间后强制注销。示例值包括:'50分钟'、'20小时'。
See also
auth.sessions.inactivity_timeout
Name | Default | Required |
---|---|---|
auth.sessions.inactivity_timeout | None | false |
Description
如果用户不活跃时间超过指定时长,则强制注销。示例值包括:'50分钟'、'20小时'。
See also
auth.third_party.aws_cognito.enabled
Name | Default | Required |
---|---|---|
auth.third_party.aws_cognito.enabled | false | false |
Description
启用AWS Cognito(Amplify)的第三方认证
See also
auth.third_party.aws_cognito.user_pool_id
Name | Default | Required |
---|---|---|
auth.third_party.aws_cognito.user_pool_id | false | false |
Description
您正在集成的AWS Cognito(Amplify)用户池ID
See also
auth.third_party.aws_cognito.user_pool_region
Name | Default | Required |
---|---|---|
auth.third_party.aws_cognito.user_pool_region | false | false |
Description
您正在集成的AWS Cognito(Amplify)用户池所在区域。示例值:'ap-southeast-1'(亚太东南1区),'us-east-1'(美国东部1区)
See also
auth.third_party.auth0.enabled
Name | Default | Required |
---|---|---|
auth.third_party.auth0.enabled | false | false |
Description
启用Auth0第三方认证
See also
auth.third_party.auth0.tenant
Name | Default | Required |
---|---|---|
auth.third_party.auth0.tenant | false | false |
Description
您正在集成的Auth0实例的租户标识符
See also
auth.third_party.tenant_region
Name | Default | Required |
---|---|---|
auth.third_party.auth0.tenant_region | false | false |
Description
您正在集成的Auth0实例的租户区域
See also
auth.third_party.firebase.enabled
Name | Default | Required |
---|---|---|
auth.third_party.firebase.enabled | false | false |
Description
启用Firebase第三方认证
See also
auth.third_party.firebase.project_id
Name | Default | Required |
---|---|---|
auth.third_party.firebase.project_id | false | false |
Description
要集成的Firebase实例的项目ID
See also
API Config
api.enabled
api.port
Name | Default | Required |
---|---|---|
api.port | 54321 | false |
Description
API URL使用的端口号。
Usage
1[api]
2port = 54321
See also
api.schemas
Name | Default | Required |
---|---|---|
api.schemas | ["public", "storage", "graphql_public"] | false |
Description
在API中公开的数据库模式。该模式中的表、视图和函数将获得API端点。public
和storage
模式始终包含在内。
See also
api.extra_search_path
Name | Default | Required |
---|---|---|
api.extra_search_path | ["public", "extensions"] | false |
Description
为每个请求的搜索路径添加额外的模式。public 模式始终包含在内。
See also
api.max_rows
Name | Default | Required |
---|---|---|
api.max_rows | 1000 | false |
Description
从视图、表或存储过程返回的最大行数。用于限制意外或恶意请求的有效载荷大小。
See also
数据库 Config
db.port
db.shadow_port
Name | Default | Required |
---|---|---|
db.shadow_port | 54320 | false |
Description
本地影子数据库使用的端口。
See also
db.major_version
Name | Default | Required |
---|---|---|
db.major_version | 15 | false |
Description
要使用的数据库主版本号。必须与远程数据库的版本一致。请在远程数据库上运行SHOW server_version;
命令进行确认。
See also
db.pooler.enabled
db.pooler.port
db.pooler.pool_mode
Name | Default | Required |
---|---|---|
db.pooler.pool_mode | "transaction" | false |
Description
指定服务器连接何时可被其他客户端重复使用。配置支持的连接池模式之一:transaction
(事务模式)、session
(会话模式)。
See also
db.pooler.default_pool_size
Name | Default | Required |
---|---|---|
db.pooler.default_pool_size | 20 | false |
Description
每个用户/数据库对允许建立的服务器连接数。
See also
db.settings.effective_cache_size
Name | Default | Required |
---|---|---|
db.settings.effective_cache_size | None | false |
Description
设置规划器对磁盘缓存有效大小的假设。 这是一个查询规划器参数,不会影响实际的内存分配。
See also
db.settings.logical_decoding_work_mem
Name | Default | Required |
---|---|---|
db.settings.logical_decoding_work_mem | None | false |
Description
指定逻辑解码在将数据写入本地磁盘前使用的内存量。
See also
db.settings.maintenance_work_mem
Name | Default | Required |
---|---|---|
db.settings.maintenance_work_mem | None | false |
Description
指定维护操作(如VACUUM、CREATE INDEX和ALTER TABLE ADD FOREIGN KEY)可使用的最大内存量。
See also
db.settings.max_connections
Name | Default | Required |
---|---|---|
db.settings.max_connections | None | false |
Description
确定与数据库服务器建立的最大并发连接数。 注意:更改此参数需要重启数据库。
See also
db.settings.max_locks_per_transaction
Name | Default | Required |
---|---|---|
db.settings.max_locks_per_transaction | None | false |
Description
控制为每个事务分配的对象锁的平均数量。 注意:更改此参数需要重启数据库。
See also
db.settings.max_parallel_maintenance_workers
Name | Default | Required |
---|---|---|
db.settings.max_parallel_maintenance_workers | None | false |
Description
设置单个实用程序命令可以启动的最大并行工作线程数。
See also
db.settings.max_parallel_workers
Name | Default | Required |
---|---|---|
db.settings.max_parallel_workers | None | false |
Description
设置系统支持的最大并行工作线程数。 注意:更改此参数需要重启数据库。
See also
db.settings.max_parallel_workers_per_gather
Name | Default | Required |
---|---|---|
db.settings.max_parallel_workers_per_gather | None | false |
Description
设置单个Gather或Gather Merge节点可启动的最大并行工作进程数。
See also
db.settings.max_replication_slots
Name | Default | Required |
---|---|---|
db.settings.max_replication_slots | None | false |
Description
指定服务器可支持的最大复制槽数量。 注意:更改此参数需要重启数据库。
See also
db.settings.max_slot_wal_keep_size
Name | Default | Required |
---|---|---|
db.settings.max_slot_wal_keep_size | None | false |
Description
指定复制槽允许在pg_wal目录中保留的WAL文件的最大大小。
See also
db.settings.max_standby_archive_delay
Name | Default | Required |
---|---|---|
db.settings.max_standby_archive_delay | None | false |
Description
设置热备服务器处理归档WAL数据时,取消查询前的最大延迟时间。
See also
db.settings.max_standby_streaming_delay
Name | Default | Required |
---|---|---|
db.settings.max_standby_streaming_delay | None | false |
Description
设置热备服务器处理流式WAL数据时,取消查询前的最大延迟时间。
See also
db.settings.max_wal_size
Name | Default | Required |
---|---|---|
db.settings.max_wal_size | None | false |
Description
设置系统将在pg_wal目录中保留的WAL文件的最大大小。
See also
db.settings.max_wal_senders
Name | Default | Required |
---|---|---|
db.settings.max_wal_senders | None | false |
Description
指定从备用服务器或流式基础备份客户端并发连接的最大数量。 注意:更改此参数需要重启数据库。
See also
db.settings.max_worker_processes
Name | Default | Required |
---|---|---|
db.settings.max_worker_processes | None | false |
Description
设置系统支持的后台进程最大数量。 注意:更改此参数需要重启数据库。
See also
db.settings.session_replication_role
Name | Default | Required |
---|---|---|
db.settings.session_replication_role | None | false |
Description
控制是否启用触发器和重写规则。有效值为:"origin"(源端)、"replica"(副本端)或"local"(本地端)
See also
db.settings.shared_buffers
Name | Default | Required |
---|---|---|
db.settings.shared_buffers | None | false |
Description
设置数据库服务器用于共享内存缓冲区的内存量。 注意:修改此参数需要重启数据库。
See also
db.settings.statement_timeout
Name | Default | Required |
---|---|---|
db.settings.statement_timeout | None | false |
Description
终止任何执行时间超过指定时长的语句。
See also
db.settings.track_activity_query_size
Name | Default | Required |
---|---|---|
db.settings.track_activity_query_size | None | false |
Description
设置将被跟踪在pg_stat_activity.current_query字段中的查询字符串的最大长度。 注意:更改此参数需要重启数据库。
See also
db.settings.track_commit_timestamp
Name | Default | Required |
---|---|---|
db.settings.track_commit_timestamp | None | false |
Description
记录事务的提交时间。 注意:更改此参数需要重启数据库。
See also
db.settings.wal_keep_size
Name | Default | Required |
---|---|---|
db.settings.wal_keep_size | None | false |
Description
指定保留在pg_wal目录中的历史日志文件段的最小大小。
See also
db.settings.wal_sender_timeout
Name | Default | Required |
---|---|---|
db.settings.wal_sender_timeout | None | false |
Description
终止超过此时间未活动的复制连接。
See also
db.settings.work_mem
Name | Default | Required |
---|---|---|
db.settings.work_mem | None | false |
Description
指定在写入临时磁盘文件之前,内部排序操作和哈希表使用的内存量。
See also
db.pooler.max_client_conn
db.seed.enabled
Name | Default | Required |
---|---|---|
db.seed.enabled | true | false |
Description
在启动或重置数据库时启用种子数据运行。
See also
db.seed.sql_paths
Name | Default | Required |
---|---|---|
db.seed.sql_paths | ["./seed.sql"] | false |
Description
用于查找种子文件的文件数组或全局模式。
See also
仪表盘 Config
studio.enabled
Name | Default | Required |
---|---|---|
studio.enabled | true | false |
Description
启用本地Supabase Studio仪表板。
See also
studio.port
Name | Default | Required |
---|---|---|
studio.port | 54323 | false |
Description
Supabase Studio使用的端口。
See also
studio.api_url
Name | Default | Required |
---|---|---|
studio.api_url | "http://localhost" | false |
Description
前端连接的API服务器的外部URL。
See also
studio.openai_api_key
Name | Default | Required |
---|---|---|
studio.openai_api_key | env(OPENAI_API_KEY) | false |
Description
用于Studio仪表板中AI功能的OpenAI API密钥。 切勿将您的OpenAI API密钥提交到git。请改用环境变量替换。
See also
实时 Config
realtime.enabled
Name | Default | Required |
---|---|---|
realtime.enabled | true | false |
Description
启用本地实时服务。
See also
realtime.ip_version
Name | Default | Required |
---|---|---|
realtime.ip_version | "IPv6" | false |
Description
通过IPv4或IPv6进行实时绑定。(默认:IPv6)
See also
存储 Config
storage.enabled
storage.file_size_limit
storage.buckets.<bucket_name>.public
Name | Default | Required |
---|---|---|
storage.buckets.bucket_name.public | false | false |
Description
启用对该存储桶的公共访问权限。
See also
storage.buckets.<bucket_name>.file_size_limit
Name | Default | Required |
---|---|---|
storage.buckets.bucket_name.file_size_limit | None | false |
Description
允许的最大文件大小(例如"5MB"、"500KB")。
See also
storage.buckets.<bucket_name>.allowed_mime_types
Name | Default | Required |
---|---|---|
storage.buckets.bucket_name.allowed_mime_types | None | false |
Description
存储桶中对象允许的MIME类型列表。
See also
storage.buckets.<bucket_name>.objects_path
Name | Default | Required |
---|---|---|
storage.buckets.bucket_name.objects_path | None | false |
Description
上传对象到存储桶的本地目录。
See also
边缘函数 Config
edge_runtime.enabled
Name | Default | Required |
---|---|---|
edge_runtime.enabled | true | false |
Description
为边缘函数启用本地边缘运行时服务。
See also
edge_runtime.policy
Name | Default | Required |
---|---|---|
edge_runtime.policy | "oneshot" | false |
Description
配置边缘函数的请求处理策略。可用选项:
oneshot
:推荐用于支持热重载的开发环境per_worker
:推荐用于负载测试场景
See also
edge_runtime.inspector_port
Name | Default | Required |
---|---|---|
edge_runtime.inspector_port | 8083 | false |
Description
用于附加 Chrome 检查器以调试 Edge Functions 的端口。
See also
functions.<function_name>.enabled
Name | Default | Required |
---|---|---|
functions.function_name.enabled | true | false |
Description
控制是否部署或提供函数服务。当设置为 false 时, 该函数在部署过程中将被跳过且不会在本地提供服务。 这对于禁用演示函数或临时禁用某个函数而不删除其代码非常有用。
See also
functions.<function_name>.verify_jwt
Name | Default | Required |
---|---|---|
functions.function_name.verify_jwt | true | false |
Description
默认情况下,当您部署边缘函数或在本地运行它们时, 系统会拒绝Authorization头中不含有效JWT的请求。 设置此配置将改变默认行为。
请注意--no-verify-jwt
标志会覆盖此配置。
See also
functions.<function_name>.import_map
Name | Default | Required |
---|---|---|
functions.function_name.import_map | None | false |
Description
指定用于该函数的Deno导入映射文件。
未指定时,默认使用supabase/functions/<function_name>/deno.json
。
请注意--import-map
标志会覆盖此配置。
See also
functions.<函数名称>.entrypoint
Name | Default | Required |
---|---|---|
functions.function_name.entrypoint | None | false |
Description
为函数指定相对于项目根目录的自定义入口点路径。
若未指定,则默认为 supabase/functions/<函数名称>/index.ts
。
Usage
1[functions.my_function]
2entrypoint = "path/to/custom/function.ts"
See also
functions.<函数名称>.static_files
Name | Default | Required |
---|---|---|
functions.function_name.static_files | None | false |
Description
指定要与函数捆绑的静态文件数组。支持 glob 模式。
注意:目前仅支持 functions
目录内的文件路径。
Usage
1[functions.my_function]
2static_files = [ "./functions/MY_FUNCTION_NAME/*.html", "./functions/MY_FUNCTION_NAME/custom.wasm" ]
See also
分析 Config
analytics.enabled
analytics.port
Name | Default | Required |
---|---|---|
analytics.port | 54327 | false |
Description
本地 Logflare 服务的端口。
See also
analytics.vector_port
Name | Default | Required |
---|---|---|
analytics.vector_port | 54328 | false |
Description
本地 syslog 接收服务的端口。
See also
analytics.backend
Name | Default | Required |
---|---|---|
analytics.backend | "postgres" | false |
Description
配置以下支持的数据库后端之一:
postgres
bigquery
See also
实验性功能 Config
experimental.webhooks.enabled
Name | Default | Required |
---|---|---|
experimental.webhooks.enabled | false | false |
Description
自动在每个新创建的分支上启用webhook功能 注意:此为实验性功能,未来版本可能变更。
See also
experimental.orioledb_version
Name | Default | Required |
---|---|---|
experimental.orioledb_version | None | false |
Description
配置Postgres存储引擎以使用支持S3的OrioleDB。 注意:这是一个实验性功能,可能在未来的版本中发生变化。
See also
experimental.s3_host
Name | Default | Required |
---|---|---|
experimental.s3_host | env(S3_HOST) | false |
Description
为OrioleDB存储配置S3存储桶URL。 格式示例:<bucket_name>.s3-<region>.amazonaws.com 注意:这是一个实验性功能,可能在未来的版本中发生变化。
See also
experimental.s3_region
Name | Default | Required |
---|---|---|
experimental.s3_region | env(S3_REGION) | false |
Description
为OrioleDB存储配置S3存储桶区域。 示例:us-east-1 注意:这是一个实验性功能,可能在未来的版本中发生变化。
See also
experimental.s3_access_key
Name | Default | Required |
---|---|---|
experimental.s3_access_key | env(S3_ACCESS_KEY) | false |
Description
配置用于访问S3存储桶的AWS_ACCESS_KEY_ID。 切勿将您的AWS访问密钥提交到git。请改用环境变量替换。 注意:此为实验性功能,可能在未来的版本中变更。
See also
experimental.s3_secret_key
Name | Default | Required |
---|---|---|
experimental.s3_secret_key | env(S3_SECRET_KEY) | false |
Description
配置用于访问S3存储桶的AWS_SECRET_ACCESS_KEY。 切勿将您的AWS密钥提交到git。请改用环境变量替换。 注意:此为实验性功能,可能在未来的版本中变更。
See also
本地开发 Config
inbucket.enabled
inbucket.port
Name | Default | Required |
---|---|---|
inbucket.port | 54324 | false |
Description
用于电子邮件测试服务器Web界面的端口。
使用本地开发设置发送的电子邮件实际上不会被发送——而是会被监控,您可以从Web界面查看本应发送的电子邮件。
See also
inbucket.smtp_port
Name | Default | Required |
---|---|---|
inbucket.smtp_port | 54325 | false |
Description
用于电子邮件测试服务器SMTP端口的端口号。
本地开发设置中发送的邮件并不会实际发出——而是会被监控,您可以通过网页界面查看那些本应发送的邮件。
若设置此端口,您可通过该端口访问SMTP服务器。
See also
inbucket.pop3_port
Name | Default | Required |
---|---|---|
inbucket.pop3_port | 54326 | false |
Description
用于电子邮件测试服务器POP3端口的端口号。
本地开发设置发送的电子邮件实际上并未发送——而是被监控,您可以通过网页界面查看本应发送的电子邮件内容。
若设置此端口,您可从此端口访问POP3服务器。
See also
inbucket.admin_email
Name | Default | Required |
---|---|---|
inbucket.admin_email | admin@email.com | false |
Description
作为应用程序发送邮件的发件人邮箱地址。
inbucket.sender_name
Name | Default | Required |
---|---|---|
inbucket.sender_name | Admin | false |
Description
应用程序发送邮件时显示的发送者名称。
分支 Config
remotes.<branch_name>.project_id
Name | Default | Required |
---|---|---|
remotes.branch_name.project_id | None | true |
Description
特定持久化Supabase分支的项目参考ID。 该ID用于在config.toml文件中配置分支部署的分支特定设置。 根配置中所有其他可用的配置选项在remotes块中也受支持。 例如,您可以像这样指定分支特定的数据库设置:
Usage
1[remotes.<branch_name>]
2project_id = "your-project-ref"
3
4[remotes.<branch_name>.db.seed]
5sql_paths = ["./seeds/staging.sql"]