[IMP] Odoo 12.0-13.0: add support for docker secret
In order to avoid postgresql password in an environment variable, a PASSWORD_FILE environment may be used instead. This allow the usage of secrets in docker-compose [0] [0](https://github.com/compose-spec/compose-spec/blob/master/spec.md#secrets)
This commit is contained in:
parent
27f9e7e8ed
commit
233277f7be
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [ -v PASSWORD_FILE ]; then
|
||||||
|
PASSWORD="$(< $PASSWORD_FILE)"
|
||||||
|
fi
|
||||||
|
|
||||||
# set the postgres database host, port, user and password according to the environment
|
# set the postgres database host, port, user and password according to the environment
|
||||||
# and pass them as arguments to the odoo process if not present in the config file
|
# and pass them as arguments to the odoo process if not present in the config file
|
||||||
: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}}
|
: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}}
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [ -v PASSWORD_FILE ]; then
|
||||||
|
PASSWORD="$(< $PASSWORD_FILE)"
|
||||||
|
fi
|
||||||
|
|
||||||
# set the postgres database host, port, user and password according to the environment
|
# set the postgres database host, port, user and password according to the environment
|
||||||
# and pass them as arguments to the odoo process if not present in the config file
|
# and pass them as arguments to the odoo process if not present in the config file
|
||||||
: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}}
|
: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}}
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [ -v PASSWORD_FILE ]; then
|
||||||
|
PASSWORD="$(< $PASSWORD_FILE)"
|
||||||
|
fi
|
||||||
|
|
||||||
# set the postgres database host, port, user and password according to the environment
|
# set the postgres database host, port, user and password according to the environment
|
||||||
# and pass them as arguments to the odoo process if not present in the config file
|
# and pass them as arguments to the odoo process if not present in the config file
|
||||||
: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}}
|
: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}}
|
||||||
|
Loading…
Reference in New Issue
Block a user