From 6a40773ca02615feb1f66f2d314323f4201b9b59 Mon Sep 17 00:00:00 2001 From: Ilya Mukhortov Date: Sun, 23 Mar 2025 10:41:34 +1000 Subject: [PATCH] pass --- Dockerfile | 28 +++++++++++++--------------- entrypoint.sh | 2 +- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/Dockerfile b/Dockerfile index b4fb33c..42e80e1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,25 +8,23 @@ RUN apt-get install -y \ nginx \ && rm -rf /var/lib/apt/lists/* -RUN pip install pip==25.0.1 - WORKDIR /app ADD requirements.txt ./ -RUN pip install -r ./requirements.txt +RUN pip install pip==25.0.1 && pip install -r ./requirements.txt + + +FROM python-nginx AS app-files + +COPY manage.py wsgi.py supervisord.conf entrypoint.sh ./ +COPY ./appa/ ./appa/ +RUN python manage.py collectstatic --noinput +RUN chmod -R 777 /app/django_static +RUN chmod +x entrypoint.sh + FROM python-nginx -COPY manage.py wsgi.py ./ +COPY --from=app-files /app /app -COPY ./appa/ ./appa/ - -RUN python manage.py collectstatic --noinput -RUN chmod -R 777 /app/django_static - -ADD ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf - -ADD ./entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh - -CMD ["/entrypoint.sh"] +CMD ["/app/entrypoint.sh"] diff --git a/entrypoint.sh b/entrypoint.sh index ff24433..dd1f9ae 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -3,4 +3,4 @@ set -e python manage.py migrate -/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf +/usr/bin/supervisord -c /app/supervisord.conf