Some checks failed
部署后端服务 / 🚀 构建并部署 (push) Has been cancelled
- 修复YAML配置文件字段格式错误(大写->小写) - 修复JWT密钥未正确识别的问题 - 修复容器内配置文件路径问题,使用绝对路径/etc/photography-api.yaml - 修复迁移工具配置文件路径 - 修复Dockerfile工作目录设置 解决了'field auth.access_secret is not set'的配置错误
44 lines
777 B
YAML
44 lines
777 B
YAML
Name: photography-api
|
|
Host: 0.0.0.0
|
|
Port: 8080
|
|
|
|
# 数据库配置
|
|
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:
|
|
access_secret: photography-secret-key-2024
|
|
access_expire: 86400
|
|
|
|
# 文件上传配置
|
|
file_upload:
|
|
max_size: 10485760 # 10MB
|
|
upload_dir: uploads
|
|
allowed_types:
|
|
- image/jpeg
|
|
- image/png
|
|
- image/gif
|
|
- image/webp
|
|
|
|
# 中间件配置
|
|
middleware:
|
|
enable_cors: true
|
|
enable_logger: true
|
|
enable_error_handle: true
|
|
cors_origins:
|
|
- http://localhost:3000
|
|
- http://localhost:3001
|
|
- http://localhost:5173
|
|
log_level: info
|