From 7825ca63708f21f28412119d218f69643727f45e Mon Sep 17 00:00:00 2001 From: Arthur Deierlein Date: Mon, 19 Aug 2024 11:00:44 +0200 Subject: [PATCH] fix(container-image): use wait-for-it package --- Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index dca104e..ebe00f8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,7 @@ FROM python:3.9.7-slim-buster@sha256:76eaa9e5bd357d6983a88ddc9c4545ef4ad64c50f84f081ba952c7ed08e3bdd6 WORKDIR /app -RUN apt-get update && apt-get install -y --no-install-recommends libpq-dev wget build-essential \ -&& wget -q https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh -P /usr/local/bin \ -&& chmod +x /usr/local/bin/wait-for-it.sh \ +RUN apt-get update && apt-get install -y --no-install-recommends libpq-dev wget build-essential wait-for-it \ && mkdir -p /app \ && useradd -u 901 -r emeis --create-home \ # all project specific folders need to be accessible by newly created user but also for unknown users (when UID is set manually). Such users are in group root. @@ -27,4 +25,4 @@ COPY . $APP_HOME EXPOSE 8000 -CMD /bin/sh -c "wait-for-it.sh $DATABASE_HOST:${DATABASE_PORT:-5432} -- ./manage.py migrate && gunicorn --workers 10 --access-logfile - --limit-request-line 16384 --bind :8000 emeis.wsgi" +CMD /bin/sh -c "wait-for-it $DATABASE_HOST:${DATABASE_PORT:-5432} -- ./manage.py migrate && gunicorn --workers 10 --access-logfile - --limit-request-line 16384 --bind :8000 emeis.wsgi"