init: 提交 files 服务初始代码

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zxr
2026-08-03 23:51:21 +08:00
commit d29693343b
33 changed files with 2067 additions and 0 deletions

47
etc/files_prod.yaml Normal file
View File

@@ -0,0 +1,47 @@
Service: files
Port: 12452
SecretKey: ops-files
Databases:
Driver: postgres
Source:
- host=8.137.107.29 user=postgres password=Weidong2023~! dbname=ops_dev port=19432 sslmode=disable TimeZone=Asia/Shanghai
Cache: redis://null:Weidong2023~!@8.137.107.29:19379/
MicroService:
Enable: false
Anonymous:
- files.ping.hello
ServiceClients:
assets: ops-assets
dc-control: ops-dc-control
visual: ops-visual
ObjectStorage:
Provider: aliyun
Endpoint: https://oss-cn-beijing.aliyuncs.com
Region: cn-beijing
Bucket: ops-app
PublicBaseURL: https://ops-app.oss-cn-beijing.aliyuncs.com
AccessKeyID: ${FILES_OSS_ACCESS_KEY_ID}
AccessKeySecret: ${FILES_OSS_ACCESS_KEY_SECRET}
PresignTTLSeconds: 600
Namespaces:
reports:
Prefix: reports
MaxSizeMB: 512
AllowedExtensions: [.csv, .xlsx, .json, .pdf, .zip]
assets:
Prefix: assets
MaxSizeMB: 50
AllowedExtensions: [.png, .jpg, .jpeg, .webp, .gif, .svg, .pdf, .doc, .docx, .xls, .xlsx]
visual:
Prefix: visual
MaxSizeMB: 100
AllowedExtensions: [.png, .jpg, .jpeg, .webp, .gif, .svg, .json, .zip, .glb, .gltf]
Cleanup:
IntervalSeconds: 600