如何设置密码odoo密码在文件中的密码? [英] how set password for password odoo secret in file?
本文介绍了如何设置密码odoo密码在文件中的密码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我通过docker在linux系统中运行容器postgres和odoo容器,问题是如何像postgres一样设置odoo机密的密码:
i run container postgres and odoo container in linux system by docker, the problem is how to set password for odoo secret like in postgres :
$ echo 'secret' > notpasswords
$ docker run -d --name pg -e POSTGRES_PASSWORD_FILE=/notpasswords -v "$PWD/notpasswords:/notpasswords" postgres:9.6-alpine
$ docker run -it --rm --link pg postgres:9.6 bash
root@c37d1f3f2910:/# psql -h pg -U postgres
Password for user postgres:
psql (9.6.5)
Type "help" for help.
postgres=#
推荐答案
If you are planning to use this in a production environment, you should take a look at docker secrets. In this case, you can make use of a special postgres environment variable to refer to the postgres password (POSTGRES_PASSWORD_FILE).
$ docker run --name some-postgres -e POSTGRES_PASSWORD_FILE=/run/secrets/postgres-passwd -d postgres
这篇关于如何设置密码odoo密码在文件中的密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文