更新环境配置,优化数据库和Redis连接设置

- 修改`.env.example`文件,更新数据库和Redis的默认主机地址为`192.168.9.127`
- 在`docker-compose.yml`中移除不必要的卷挂载配置
- 在`go.mod`中添加`github.com/joho/godotenv`依赖以支持环境变量加载
- 更新`README.md`以反映新的数据库和Redis连接信息
- 在`main.go`中加载环境变量以支持动态配置
- 新增缓存存在性检查功能,避免重复预热缓存
- 优化CSV读取逻辑,支持从S3获取数据
This commit is contained in:
eafonyang
2026-06-08 14:52:23 +08:00
parent 99785672a5
commit 87bdad34fc
15 changed files with 136 additions and 110 deletions
-5
View File
@@ -17,11 +17,6 @@ services:
- ENABLE_PERSIST_TASK=false
- AWS_REGION=eu-central-1
- S3_BUCKET=luxsin-app-bucket
- MEASUREMENT_BASE_PATH=/app/measurements
- TARGET_BASE_PATH=/app/targets
volumes:
- /data/project/autoeq/measurements:/app/measurements:ro
- /data/project/autoeq/targets:/app/targets:ro
healthcheck:
test: ["CMD", "wget", "-q", "-O", "/dev/null", "http://localhost:8080/api/v1/health"]
interval: 30s