add first commit
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
[default]
|
||||
app.debug = false
|
||||
app.description = "基于 FastAPI 的 chongming 打包脚手架"
|
||||
app.name = "chongming"
|
||||
app.version = "0.1.0"
|
||||
env = "production"
|
||||
prefix = "/api/v1"
|
||||
upload_path = "uploads"
|
||||
|
||||
[database]
|
||||
generate_schemas = true # 生产环境使用迁移工具
|
||||
type = "sqlite"
|
||||
url = "sqlite+aiosqlite:///./data/database.db"
|
||||
|
||||
[database.sqlite]
|
||||
connect_args.check_same_thread = false
|
||||
connect_args.timeout = 15
|
||||
echo = false
|
||||
echo_pool = false
|
||||
max_overflow = 10
|
||||
pool_pre_ping = true
|
||||
pool_recycle = 300
|
||||
pool_size = 20
|
||||
pool_timeout = 30
|
||||
|
||||
[scheduler]
|
||||
job_store_path = "scheduler_jobs.db"
|
||||
|
||||
[cache]
|
||||
cache_store_path = "./"
|
||||
|
||||
[security]
|
||||
access_token_expire_minutes = 30
|
||||
algorithm = "HS256"
|
||||
max_sessions_per_user = 5
|
||||
refresh_token_expire_days = 7
|
||||
secret_key = "your-secret-key-change-in-production"
|
||||
|
||||
[production]
|
||||
debug = false
|
||||
env = "production"
|
||||
|
||||
[production.server]
|
||||
access_log = false
|
||||
host = "0.0.0.0"
|
||||
port = 8000
|
||||
reload = false
|
||||
timeout_keep_alive = 65
|
||||
workers = 4
|
||||
|
||||
[production.logging]
|
||||
backup_count = 5 # 最多保存 10 个日志文件
|
||||
file = "logs"
|
||||
format = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
||||
level = "INFO"
|
||||
max_size = 10485760 # 10MB
|
||||
|
||||
[production.cors]
|
||||
allow_credentials = true
|
||||
allow_headers = ["*"]
|
||||
allow_methods = ["*"]
|
||||
allow_origins = ["http://192.168.137.5:8000", "http://localhost:8000", "http://127.0.0.1:8000"]
|
||||
|
||||
[production.module_system]
|
||||
path = [
|
||||
"resources/app.mbank",
|
||||
"resources/plugins.mbank",
|
||||
]
|
||||
type = "module-bank"
|
||||
|
||||
[production.file_system]
|
||||
path = "static.svfs"
|
||||
type = "svfs"
|
||||
|
||||
[[workers]]
|
||||
type = "example"
|
||||
module = "plugins.example"
|
||||
factory = "create_workers"
|
||||
count = 3
|
||||
config = { type = "example" }
|
||||
Reference in New Issue
Block a user