refactor: docker-compose.yml从.env读取配置,支持默认值

This commit is contained in:
claw_bot 2026-03-09 09:30:52 +00:00
parent 19e53bd86e
commit 9be6521fd0

View File

@ -9,20 +9,15 @@ services:
ports:
- "7040:8080"
environment:
- ASPNETCORE_ENVIRONMENT=Production
# 外部 MySQL 连接配置(自行修改)
- ConnectionStrings__Default=server=你的MySQL地址;Database=assetmanager;Uid=你的用户名;Pwd=你的密码;CharSet=utf8mb4;Allow User Variables=true;
# JWT 配置
- Jwt__SecretKey=your-strong-secret-key-here-change-in-production
- Jwt__Issuer=AssetManager
- Jwt__Audience=AssetManager
# 微信配置
- Wechat__AppId=wx245f0f3ebcfcf5a7
- Wechat__AppSecret=809c740129bc8b434177ce12ef292dd0
# Tiingo API 配置
- Tiingo__ApiKey=bd00fee76d3012b047473078904001b33322cb46
# 时区
- TZ=Asia/Shanghai
- ASPNETCORE_ENVIRONMENT=${ASPNETCORE_ENVIRONMENT:-Production}
- ConnectionStrings__Default=${ConnectionStrings__Default}
- Jwt__SecretKey=${Jwt__SecretKey}
- Jwt__Issuer=${Jwt__Issuer:-AssetManager}
- Jwt__Audience=${Jwt__Audience:-AssetManager}
- Wechat__AppId=${Wechat__AppId}
- Wechat__AppSecret=${Wechat__AppSecret}
- Tiingo__ApiKey=${Tiingo__ApiKey}
- TZ=${TZ:-Asia/Shanghai}
volumes:
- logs:/app/logs