fix: 统一 docker-compose 环境变量注入方式,修复 postgres/redis 配置读取问题 #130
Reference in New Issue
Block a user
Delete Branch "feature/add-redis-docker"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
- postgres 和 redis 服务添加 env_file,统一从 /opt/camtalk/.env 读取配置 - 移除 postgres 中多余的 ${POSTGRES_USER/PASSWORD} 透传(env_file 已直接注入) - 移除 backend 中多余的 CAMTALK_STORAGE_DSN 和 CAMTALK_REDIS_PASSWORD 透传 - postgres healthcheck 改用 $$POSTGRES_USER(容器内 shell 变量)替代 ${POSTGRES_USER}(compose 变量替换) - 根本原因:environment 中的 ${VAR} 在 compose 解析时读取 shell 环境,为空时会覆盖 env_file 的值