[IMP] Allow PG* env vars to be set directly
Makes it possible to use a non-linked Postgres container without having to fake $DB_* environment variables.
This commit is contained in:
parent
89454a4c41
commit
6a6ceb5b10
11
8.0/run.sh
11
8.0/run.sh
@ -1,10 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
# set odoo database host, port, user and password
|
# set odoo database host, port, user and password
|
||||||
export PGHOST=$DB_PORT_5432_TCP_ADDR
|
: ${PGHOST:=$DB_PORT_5432_TCP_ADDR}
|
||||||
export PGPORT=$DB_PORT_5432_TCP_PORT
|
: ${PGPORT:=$DB_PORT_5432_TCP_PORT}
|
||||||
export PGUSER=$DB_ENV_POSTGRES_USER
|
: ${PGUSER:=${DB_ENV_POSTGRES_USER:='postgres'}}
|
||||||
export PGPASSWORD=$DB_ENV_POSTGRES_PASSWORD
|
: ${PGPASSWORD:=$DB_ENV_POSTGRES_PASSWORD}
|
||||||
|
export PGHOST PGPORT PGUSER PGPASSWORD
|
||||||
|
|
||||||
[ "$1" != "--" ] && exec "$@"
|
[ "$1" != "--" ] && exec "$@"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user