Update entrypoint to use new var
Missed one change.
This commit is contained in:
parent
5740583e38
commit
1a90a625d4
@ -10,10 +10,13 @@ fi
|
|||||||
# 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'}}
|
||||||
: ${PORT:=${DB_PORT_5432_TCP_PORT:=5432}}
|
: ${PORT:=${DB_PORT_5432_TCP_PORT:=5432}}
|
||||||
|
: ${NAME:=${DB_ENV_POSTGRES_NAME:=${POSTGRES_NAME:='postgres'}}}
|
||||||
: ${USER:=${DB_ENV_POSTGRES_USER:=${POSTGRES_USER:='odoo'}}}
|
: ${USER:=${DB_ENV_POSTGRES_USER:=${POSTGRES_USER:='odoo'}}}
|
||||||
: ${PASSWORD:=${DB_ENV_POSTGRES_PASSWORD:=${POSTGRES_PASSWORD:='odoo'}}}
|
: ${PASSWORD:=${DB_ENV_POSTGRES_PASSWORD:=${POSTGRES_PASSWORD:='odoo'}}}
|
||||||
|
: ${SEED:=${DB_ENV_SEED:=false}}
|
||||||
|
|
||||||
DB_ARGS=()
|
DB_ARGS=()
|
||||||
|
ODOO_ARGS=()
|
||||||
function check_config() {
|
function check_config() {
|
||||||
param="$1"
|
param="$1"
|
||||||
value="$2"
|
value="$2"
|
||||||
@ -23,11 +26,17 @@ function check_config() {
|
|||||||
DB_ARGS+=("--${param}")
|
DB_ARGS+=("--${param}")
|
||||||
DB_ARGS+=("${value}")
|
DB_ARGS+=("${value}")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_config "db_name" "$NAME"
|
||||||
check_config "db_host" "$HOST"
|
check_config "db_host" "$HOST"
|
||||||
check_config "db_port" "$PORT"
|
check_config "db_port" "$PORT"
|
||||||
check_config "db_user" "$USER"
|
check_config "db_user" "$USER"
|
||||||
check_config "db_password" "$PASSWORD"
|
check_config "db_password" "$PASSWORD"
|
||||||
|
|
||||||
|
if "$SEED" ; then
|
||||||
|
ODOO_ARGS+=("-i base")
|
||||||
|
fi
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-- | odoo)
|
-- | odoo)
|
||||||
shift
|
shift
|
||||||
@ -35,12 +44,12 @@ case "$1" in
|
|||||||
exec odoo "$@"
|
exec odoo "$@"
|
||||||
else
|
else
|
||||||
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
|
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
|
||||||
exec odoo "$@" "${DB_ARGS[@]}"
|
exec odoo "$@" "${DB_ARGS[@]}" "${ODOO_ARGS[@]}"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
-*)
|
-*)
|
||||||
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
|
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
|
||||||
exec odoo "$@" "${DB_ARGS[@]}"
|
exec odoo "$@" "${DB_ARGS[@]}" "${ODOO_ARGS[@]}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
@ -10,10 +10,13 @@ fi
|
|||||||
# 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'}}
|
||||||
: ${PORT:=${DB_PORT_5432_TCP_PORT:=5432}}
|
: ${PORT:=${DB_PORT_5432_TCP_PORT:=5432}}
|
||||||
|
: ${NAME:=${DB_ENV_POSTGRES_NAME:=${POSTGRES_NAME:='postgres'}}}
|
||||||
: ${USER:=${DB_ENV_POSTGRES_USER:=${POSTGRES_USER:='odoo'}}}
|
: ${USER:=${DB_ENV_POSTGRES_USER:=${POSTGRES_USER:='odoo'}}}
|
||||||
: ${PASSWORD:=${DB_ENV_POSTGRES_PASSWORD:=${POSTGRES_PASSWORD:='odoo'}}}
|
: ${PASSWORD:=${DB_ENV_POSTGRES_PASSWORD:=${POSTGRES_PASSWORD:='odoo'}}}
|
||||||
|
: ${SEED:=${DB_ENV_SEED:=false}}
|
||||||
|
|
||||||
DB_ARGS=()
|
DB_ARGS=()
|
||||||
|
ODOO_ARGS=()
|
||||||
function check_config() {
|
function check_config() {
|
||||||
param="$1"
|
param="$1"
|
||||||
value="$2"
|
value="$2"
|
||||||
@ -23,11 +26,17 @@ function check_config() {
|
|||||||
DB_ARGS+=("--${param}")
|
DB_ARGS+=("--${param}")
|
||||||
DB_ARGS+=("${value}")
|
DB_ARGS+=("${value}")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_config "db_name" "$NAME"
|
||||||
check_config "db_host" "$HOST"
|
check_config "db_host" "$HOST"
|
||||||
check_config "db_port" "$PORT"
|
check_config "db_port" "$PORT"
|
||||||
check_config "db_user" "$USER"
|
check_config "db_user" "$USER"
|
||||||
check_config "db_password" "$PASSWORD"
|
check_config "db_password" "$PASSWORD"
|
||||||
|
|
||||||
|
if "$SEED" ; then
|
||||||
|
ODOO_ARGS+=("-i base")
|
||||||
|
fi
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-- | odoo)
|
-- | odoo)
|
||||||
shift
|
shift
|
||||||
@ -35,12 +44,12 @@ case "$1" in
|
|||||||
exec odoo "$@"
|
exec odoo "$@"
|
||||||
else
|
else
|
||||||
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
|
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
|
||||||
exec odoo "$@" "${DB_ARGS[@]}"
|
exec odoo "$@" "${DB_ARGS[@]}" "${ODOO_ARGS[@]}"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
-*)
|
-*)
|
||||||
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
|
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
|
||||||
exec odoo "$@" "${DB_ARGS[@]}"
|
exec odoo "$@" "${DB_ARGS[@]}" "${ODOO_ARGS[@]}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
@ -10,10 +10,13 @@ fi
|
|||||||
# 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'}}
|
||||||
: ${PORT:=${DB_PORT_5432_TCP_PORT:=5432}}
|
: ${PORT:=${DB_PORT_5432_TCP_PORT:=5432}}
|
||||||
|
: ${NAME:=${DB_ENV_POSTGRES_NAME:=${POSTGRES_NAME:='postgres'}}}
|
||||||
: ${USER:=${DB_ENV_POSTGRES_USER:=${POSTGRES_USER:='odoo'}}}
|
: ${USER:=${DB_ENV_POSTGRES_USER:=${POSTGRES_USER:='odoo'}}}
|
||||||
: ${PASSWORD:=${DB_ENV_POSTGRES_PASSWORD:=${POSTGRES_PASSWORD:='odoo'}}}
|
: ${PASSWORD:=${DB_ENV_POSTGRES_PASSWORD:=${POSTGRES_PASSWORD:='odoo'}}}
|
||||||
|
: ${SEED:=${DB_ENV_SEED:=false}}
|
||||||
|
|
||||||
DB_ARGS=()
|
DB_ARGS=()
|
||||||
|
ODOO_ARGS=()
|
||||||
function check_config() {
|
function check_config() {
|
||||||
param="$1"
|
param="$1"
|
||||||
value="$2"
|
value="$2"
|
||||||
@ -23,11 +26,17 @@ function check_config() {
|
|||||||
DB_ARGS+=("--${param}")
|
DB_ARGS+=("--${param}")
|
||||||
DB_ARGS+=("${value}")
|
DB_ARGS+=("${value}")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_config "db_name" "$NAME"
|
||||||
check_config "db_host" "$HOST"
|
check_config "db_host" "$HOST"
|
||||||
check_config "db_port" "$PORT"
|
check_config "db_port" "$PORT"
|
||||||
check_config "db_user" "$USER"
|
check_config "db_user" "$USER"
|
||||||
check_config "db_password" "$PASSWORD"
|
check_config "db_password" "$PASSWORD"
|
||||||
|
|
||||||
|
if "$SEED" ; then
|
||||||
|
ODOO_ARGS+=("-i base")
|
||||||
|
fi
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-- | odoo)
|
-- | odoo)
|
||||||
shift
|
shift
|
||||||
@ -35,12 +44,12 @@ case "$1" in
|
|||||||
exec odoo "$@"
|
exec odoo "$@"
|
||||||
else
|
else
|
||||||
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
|
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
|
||||||
exec odoo "$@" "${DB_ARGS[@]}"
|
exec odoo "$@" "${DB_ARGS[@]}" "${ODOO_ARGS[@]}"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
-*)
|
-*)
|
||||||
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
|
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
|
||||||
exec odoo "$@" "${DB_ARGS[@]}"
|
exec odoo "$@" "${DB_ARGS[@]}" "${ODOO_ARGS[@]}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
Loading…
Reference in New Issue
Block a user