Skip to content

Commit 7825ca6

Browse files
committed
fix(container-image): use wait-for-it package
1 parent 19f7810 commit 7825ca6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Dockerfile

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
FROM python:3.9.7-slim-buster@sha256:76eaa9e5bd357d6983a88ddc9c4545ef4ad64c50f84f081ba952c7ed08e3bdd6
22
WORKDIR /app
33

4-
RUN apt-get update && apt-get install -y --no-install-recommends libpq-dev wget build-essential \
5-
&& wget -q https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh -P /usr/local/bin \
6-
&& chmod +x /usr/local/bin/wait-for-it.sh \
4+
RUN apt-get update && apt-get install -y --no-install-recommends libpq-dev wget build-essential wait-for-it \
75
&& mkdir -p /app \
86
&& useradd -u 901 -r emeis --create-home \
97
# 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
2725

2826
EXPOSE 8000
2927

30-
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"
28+
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"

0 commit comments

Comments
 (0)