This commit is contained in:
Ilya Mukhortov 2025-03-23 10:41:34 +10:00
parent 85fd2e2361
commit 6a40773ca0
2 changed files with 14 additions and 16 deletions

View File

@ -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"]

View File

@ -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