-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(docker-compose): command format incorrect, postgres not fixed #161
Conversation
@PA733 拜托看一下这个 PR,之前的没有完全修复 |
@Garfield550 也许橘橘可以帮忙测试一下,我这边测试下来没有什么问题了 |
抱歉,我在portainer上试的,没在docker-compose模块里面尝试 |
了解了,那我放 portainer 里面试试看w |
docker-compose.yml
Outdated
healthcheck: | ||
test: [ "CMD-SHELL", "redis-cli -e ${REDIS_PASSWORD:+-a \"$REDIS_PASSWORD\"} --no-auth-warning ping" ] | ||
test: [ "CMD-SHELL", "redis-cli -a $$REDIS_PASSWORD --no-auth-warning ping" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
之前的改动考虑到了空密码和密码含空格的情况。
如果指定了--requirepass ""
,那么redis将会被锁死(任何登录操作,redis都会返回NOAUTH Authentication required
信息)。
之前的逻辑是,密码为空时不传入--requirepass
参数。
-e
让认证失败或ping失败时,redis-cli返回非零状态码,这样docker就能正确捕获异常。
--no-auth-warning
去掉了在命令行传入密码时,redis-cli的警告信息
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔️ 确实没想过这种情况,谢谢指出,那我修正一下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
修改回去了,可以再看看
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在shell和portainer上都测试了一遍,都正常了🥳
No description provided.