Skip to content

Commit

Permalink
Remove SEED variable
Browse files Browse the repository at this point in the history
  • Loading branch information
thatnerdjosh committed Mar 31, 2024
1 parent 7509082 commit 0777f0b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 24 deletions.
10 changes: 2 additions & 8 deletions 15.0/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ fi
: ${NAME:=${DB_ENV_POSTGRES_NAME:=${POSTGRES_NAME:='postgres'}}}
: ${USER:=${DB_ENV_POSTGRES_USER:=${POSTGRES_USER:='odoo'}}}
: ${PASSWORD:=${DB_ENV_POSTGRES_PASSWORD:=${POSTGRES_PASSWORD:='odoo'}}}
: ${SEED:=${DB_ENV_SEED:=false}}

DB_ARGS=()
ODOO_ARGS=()
function check_config() {
param="$1"
value="$2"
Expand All @@ -33,23 +31,19 @@ check_config "db_port" "$PORT"
check_config "db_user" "$USER"
check_config "db_password" "$PASSWORD"

if "$SEED" ; then
ODOO_ARGS+=("-i base")
fi

case "$1" in
-- | odoo)
shift
if [[ "$1" == "scaffold" ]] ; then
exec odoo "$@"
else
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
exec odoo "$@" "${DB_ARGS[@]}" "${ODOO_ARGS[@]}"
exec odoo "$@" "${DB_ARGS[@]}"
fi
;;
-*)
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
exec odoo "$@" "${DB_ARGS[@]}" "${ODOO_ARGS[@]}"
exec odoo "$@" "${DB_ARGS[@]}"
;;
*)
exec "$@"
Expand Down
10 changes: 2 additions & 8 deletions 16.0/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ fi
: ${NAME:=${DB_ENV_POSTGRES_NAME:=${POSTGRES_NAME:='postgres'}}}
: ${USER:=${DB_ENV_POSTGRES_USER:=${POSTGRES_USER:='odoo'}}}
: ${PASSWORD:=${DB_ENV_POSTGRES_PASSWORD:=${POSTGRES_PASSWORD:='odoo'}}}
: ${SEED:=${DB_ENV_SEED:=false}}

DB_ARGS=()
ODOO_ARGS=()
function check_config() {
param="$1"
value="$2"
Expand All @@ -33,23 +31,19 @@ check_config "db_port" "$PORT"
check_config "db_user" "$USER"
check_config "db_password" "$PASSWORD"

if "$SEED" ; then
ODOO_ARGS+=("-i base")
fi

case "$1" in
-- | odoo)
shift
if [[ "$1" == "scaffold" ]] ; then
exec odoo "$@"
else
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
exec odoo "$@" "${DB_ARGS[@]}" "${ODOO_ARGS[@]}"
exec odoo "$@" "${DB_ARGS[@]}"
fi
;;
-*)
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
exec odoo "$@" "${DB_ARGS[@]}" "${ODOO_ARGS[@]}"
exec odoo "$@" "${DB_ARGS[@]}"
;;
*)
exec "$@"
Expand Down
10 changes: 2 additions & 8 deletions 17.0/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ fi
: ${NAME:=${DB_ENV_POSTGRES_NAME:=${POSTGRES_NAME:='postgres'}}}
: ${USER:=${DB_ENV_POSTGRES_USER:=${POSTGRES_USER:='odoo'}}}
: ${PASSWORD:=${DB_ENV_POSTGRES_PASSWORD:=${POSTGRES_PASSWORD:='odoo'}}}
: ${SEED:=${DB_ENV_SEED:=false}}

DB_ARGS=()
ODOO_ARGS=()
function check_config() {
param="$1"
value="$2"
Expand All @@ -33,23 +31,19 @@ check_config "db_port" "$PORT"
check_config "db_user" "$USER"
check_config "db_password" "$PASSWORD"

if "$SEED" ; then
ODOO_ARGS+=("-i base")
fi

case "$1" in
-- | odoo)
shift
if [[ "$1" == "scaffold" ]] ; then
exec odoo "$@"
else
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
exec odoo "$@" "${DB_ARGS[@]}" "${ODOO_ARGS[@]}"
exec odoo "$@" "${DB_ARGS[@]}"
fi
;;
-*)
wait-for-psql.py ${DB_ARGS[@]} --timeout=30
exec odoo "$@" "${DB_ARGS[@]}" "${ODOO_ARGS[@]}"
exec odoo "$@" "${DB_ARGS[@]}"
;;
*)
exec "$@"
Expand Down

0 comments on commit 0777f0b

Please sign in to comment.