You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
2.3 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# ==================================
# 生产环境配置文件模版:复制此文件为 .env.prod 并修改配置
# ==================================
ENVIRONMENT = "prod"
# 服务器配置
SERVER_HOST = '0.0.0.0' # 允许访问的IP地址
SERVER_PORT = 8001 # 服务端口
# 文档配置
DEBUG = False # 调试模式
TITLE = "🎉 FastapiAdmin 🎉 -prod" # 文档标题
VERSION = '0.1.0' # 版本号
SUMMARY = "接口汇总" # 文档概述
DOCS_URL = "/docs" # Swagger UI路径
REDOC_URL = "/redoc" # ReDoc路径
ROOT_PATH = "/api/v1" # API路由前缀
DESCRIPTION = "该项目是一个基于python的web服务框架基于fastapi和sqlalchemy实现。" # 文档描述
# 跨域配置(前后端分离后改为正式前端域名)
ALLOW_ORIGINS = ["https://admin.example.com"]
# OAuth 回调失败时回跳的前端登录页
OAUTH_FRONTEND_FALLBACK = "https://admin.example.com/login"
# 代码生成输出路径(按后端/前端两个项目与同级目录存放)
CODEGEN_BACKEND_PROJECT_PATH = "fastapiadmin-backend"
CODEGEN_FRONTEND_PROJECT_PATH = "fastapiadmin-web"
# 是否启用演示模式
DEMO_ENABLE = True
# 数据库配置
DATABASE_TYPE = "mysql" # mysql、postgres、sqlite、dm(sqlite、dm不支持代码生成)
# 数据库配置
DATABASE_HOST = "your_database_host"
DATABASE_PORT = 3306 # MySQL默认端口3306 PostgreSQL默认端口5432
DATABASE_USER = "root" # PostgreSQL 用户是 postgres
DATABASE_PASSWORD = "your_database_password"
DATABASE_NAME = "fastapiadmin"
# Redis配置
REDIS_ENABLE = True
REDIS_HOST = "your_redis_host"
REDIS_PORT = 6379
REDIS_USER = ''
REDIS_PASSWORD = 'your_redis_password'
REDIS_DB_NAME = 1
# 日志配置
LOGGER_LEVEL = 'INFO'
# 大模型配置
OPENAI_BASE_URL = "https://api.minimax.chat"
OPENAI_API_KEY = "your_api_key"
OPENAI_MODEL = "deepseek-v4-flash"
# MinIO对象存储配置
MINIO_ENABLE = False
MINIO_ENDPOINT = "your_minio_host:9000"
MINIO_ACCESS_KEY = "your_minio_access_key"
MINIO_SECRET_KEY = "your_minio_secret_key"
MINIO_BUCKET_NAME = "fastapiadmin"
MINIO_SECURE = True
MINIO_REGION = ""
MINIO_PUBLIC_URL = "https://oss.example.com"
MINIO_PRESIGNED_EXPIRE_SECONDS = 3600
# IP 归属地查询(登录时对外请求第三方 API生产建议关闭
IP_LOCATION_ENABLE=False