diff --git a/11.0/Dockerfile b/11.0/Dockerfile index f8f56c8..080e08d 100644 --- a/11.0/Dockerfile +++ b/11.0/Dockerfile @@ -13,6 +13,7 @@ RUN set -x; \ && apt-get install -y --no-install-recommends \ ca-certificates \ curl \ + wait-for-it \ dirmngr \ fonts-noto-cjk \ gnupg \ diff --git a/11.0/entrypoint.sh b/11.0/entrypoint.sh index 4f0ef59..b6401f7 100755 --- a/11.0/entrypoint.sh +++ b/11.0/entrypoint.sh @@ -23,6 +23,9 @@ check_config "db_port" "$PORT" check_config "db_user" "$USER" check_config "db_password" "$PASSWORD" +# Wait for the database to be up +wait-for-it $HOST:$PORT --timeout=60 -- sleep 5s + case "$1" in -- | odoo) shift diff --git a/12.0/Dockerfile b/12.0/Dockerfile index 8103ab6..6f8f85f 100644 --- a/12.0/Dockerfile +++ b/12.0/Dockerfile @@ -13,6 +13,7 @@ RUN set -x; \ && apt-get install -y --no-install-recommends \ ca-certificates \ curl \ + wait-for-it \ dirmngr \ fonts-noto-cjk \ gnupg \ diff --git a/12.0/entrypoint.sh b/12.0/entrypoint.sh index 4f0ef59..b6401f7 100755 --- a/12.0/entrypoint.sh +++ b/12.0/entrypoint.sh @@ -23,6 +23,9 @@ check_config "db_port" "$PORT" check_config "db_user" "$USER" check_config "db_password" "$PASSWORD" +# Wait for the database to be up +wait-for-it $HOST:$PORT --timeout=60 -- sleep 5s + case "$1" in -- | odoo) shift diff --git a/13.0/Dockerfile b/13.0/Dockerfile index 44d25bd..ea22d90 100644 --- a/13.0/Dockerfile +++ b/13.0/Dockerfile @@ -10,6 +10,7 @@ RUN set -x; \ && apt-get install -y --no-install-recommends \ ca-certificates \ curl \ + wait-for-it \ dirmngr \ fonts-noto-cjk \ gnupg \ diff --git a/13.0/entrypoint.sh b/13.0/entrypoint.sh index 4f0ef59..b6401f7 100755 --- a/13.0/entrypoint.sh +++ b/13.0/entrypoint.sh @@ -23,6 +23,9 @@ check_config "db_port" "$PORT" check_config "db_user" "$USER" check_config "db_password" "$PASSWORD" +# Wait for the database to be up +wait-for-it $HOST:$PORT --timeout=60 -- sleep 5s + case "$1" in -- | odoo) shift