-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from jokester/add-env-template
Add .env template
- Loading branch information
Showing
2 changed files
with
80 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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,79 @@ | ||
# 萌翻Backend的环境变量模板 | ||
# 模板中值为 CHANGE_ME 的设置涉及安全,请一定在部署时修改 | ||
|
||
# 【请修改】在导出文件及邮件中显示 | ||
SITE_NAME=萌翻local | ||
# 【请修改】用于加密用户 session,请配置一个很长的密钥,建议配置为 64 位以上字母数字组成的密钥 | ||
# 可用使用 python -c 'import secrets; print(secrets.token_hex())' 命令来随机生成一个 | ||
SECRET_KEY=CHANGE_ME | ||
# 【请修改】管理员邮箱,第一次启动会创建此账号,默认密码为 123123,请及时修改密码! | ||
# 之后每次程序启动时,会将此账号设置为管理员 | ||
ADMIN_EMAIL=[email protected] | ||
|
||
# APP 专用的 MongoDB 数据库名称 | ||
MONGODB_DB_NAME=moeflow | ||
|
||
# ----------- | ||
# Storage 配置 | ||
# ----------- | ||
# 目前支持 LOCAL_STORAGE 和 OSS 和 OPENDAL | ||
STORAGE_TYPE=LOCAL_STORAGE | ||
# STORAGE_DOMAIN: 返回给客户端的图片URL前缀 | ||
# 1. 如果STORAGE_TYPE为OSS | ||
# - 未设置自定义域名则填写阿里云提供的 OSS 域名,格式如:https://<your-bucket-name>.<oss-region>.aliyuncs.com/ | ||
# - 如果绑定了 CDN 来加速 OSS,则填写绑定在 CDN 的域名 | ||
# 2. 如果STORAGE_TYPE为LOCAL_STORAGE | ||
# - 本地储存填写绑定到服务器的域名+"/storage/",格式如:http(s)://<your-domain>.com/storage/, | ||
# 3. 如果STORAGE_TYPE为OPENDAL: 不生效 (图片URL将由OPENDAL_STORAGE_PROVIDER决定) | ||
STORAGE_DOMAIN=http://${DOMAIN}:${HTTP_PORT}/storage/ | ||
# (可不修改) 允许上传文件的最大大小(MB),默认 1GB | ||
MAX_CONTENT_LENGTH_MB=1024 | ||
|
||
## OSS_*: STORAGE_TYPE为OSS时的配置 | ||
OSS_ACCESS_KEY_ID= | ||
OSS_ACCESS_KEY_SECRET= | ||
# OSS Endpoint(地域节点) | ||
# 含协议名,形如 https://oss-cn-shanghai.aliyuncs.com/ | ||
OSS_ENDPOINT= | ||
OSS_BUCKET_NAME= | ||
# (可不修改) OSS 图片处理规则名称 | ||
OSS_PROCESS_COVER_NAME=cover | ||
OSS_PROCESS_SAFE_CHECK_NAME=safe-check | ||
|
||
# ----------- | ||
# CDN 配置 | ||
# ----------- | ||
# 如果绑定了 CDN 来加速 OSS,且开启了 CDN 的[阿里云 OSS 私有 Bucket 回源]和[URL 鉴权], | ||
# 此时需要设置 OSS_VIA_CDN = True,并设置 CDN URL 鉴权主/备 KEY | ||
OSS_VIA_CDN=True | ||
CDN_URL_KEY_A= | ||
CDN_URL_KEY_B= | ||
|
||
# ----------- | ||
# Email 配置 | ||
# ----------- | ||
# 是否发送用户邮件(验证码等) | ||
ENABLE_USER_EMAIL=False | ||
# 是否发送日志邮件 | ||
ENABLE_LOG_EMAIL=False | ||
# SMTP 服务器地址 | ||
EMAIL_SMTP_HOST= | ||
# SMTP 服务器端口 | ||
EMAIL_SMTP_PORT= | ||
# 是否使用 SSL 连接 SMTP 服务器 | ||
EMAIL_USE_SSL=True | ||
# 发件邮箱地址 | ||
EMAIL_ADDRESS= | ||
# SMTP 服务器登陆用户名,通常是邮箱全称 | ||
EMAIL_USERNAME= | ||
# SMTP 服务器登陆密码 | ||
EMAIL_PASSWORD= | ||
# 用户回信邮箱地址 | ||
EMAIL_REPLY_ADDRESS= | ||
# 网站错误报告邮箱地址 | ||
EMAIL_ERROR_ADDRESS= | ||
|
||
# Options for non default features. only enable if you know what you are doing. | ||
# CELERY_BROKER_URL="amqp://moeflow:PLEASE_CHANGE_THIS@moeflow-rabbitmq:5672/moeflow" | ||
# CELERY_BACKEND_URL='mongodb://moeflow:PLEASE_CHANGE_THIS@moeflow-mongodb:27017/moeflow?authSource=admin' | ||
# MIT_STORAGE_ROOT=/app/storage |
This file contains 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