- 修复YAML配置文件字段格式错误(大写->小写) - 修复JWT密钥未正确识别的问题 - 修复容器内配置文件路径问题,使用绝对路径/etc/photography-api.yaml - 修复迁移工具配置文件路径 - 修复Dockerfile工作目录设置 解决了'field auth.access_secret is not set'的配置错误
This commit is contained in:
@ -3,41 +3,41 @@ Host: 0.0.0.0
|
||||
Port: 8080
|
||||
|
||||
# 数据库配置
|
||||
Database:
|
||||
Driver: sqlite
|
||||
FilePath: data/photography.db
|
||||
Host: localhost
|
||||
Port: 5432
|
||||
Database: photography
|
||||
Username: postgres
|
||||
Password: ""
|
||||
Charset: utf8mb4
|
||||
SSLMode: disable
|
||||
MaxOpenConns: 100
|
||||
MaxIdleConns: 10
|
||||
database:
|
||||
driver: sqlite
|
||||
file_path: data/photography.db
|
||||
host: localhost
|
||||
port: 5432
|
||||
database: photography
|
||||
username: postgres
|
||||
password: ""
|
||||
charset: utf8mb4
|
||||
ssl_mode: disable
|
||||
max_open_conns: 100
|
||||
max_idle_conns: 10
|
||||
|
||||
# 认证配置
|
||||
Auth:
|
||||
AccessSecret: photography-secret-key-2024
|
||||
AccessExpire: 86400
|
||||
auth:
|
||||
access_secret: photography-secret-key-2024
|
||||
access_expire: 86400
|
||||
|
||||
# 文件上传配置
|
||||
FileUpload:
|
||||
MaxSize: 10485760 # 10MB
|
||||
UploadDir: uploads
|
||||
AllowedTypes:
|
||||
file_upload:
|
||||
max_size: 10485760 # 10MB
|
||||
upload_dir: uploads
|
||||
allowed_types:
|
||||
- image/jpeg
|
||||
- image/png
|
||||
- image/gif
|
||||
- image/webp
|
||||
|
||||
# 中间件配置
|
||||
Middleware:
|
||||
EnableCORS: true
|
||||
EnableLogger: true
|
||||
EnableErrorHandle: true
|
||||
CORSOrigins:
|
||||
middleware:
|
||||
enable_cors: true
|
||||
enable_logger: true
|
||||
enable_error_handle: true
|
||||
cors_origins:
|
||||
- http://localhost:3000
|
||||
- http://localhost:3001
|
||||
- http://localhost:5173
|
||||
LogLevel: info
|
||||
log_level: info
|
||||
|
||||
Reference in New Issue
Block a user