33 lines
559 B
Docker
33 lines
559 B
Docker
|
|
FROM python:3.12.2 AS python-nginx
|
|
|
|
RUN apt-get update
|
|
RUN apt-get install -y \
|
|
vim \
|
|
supervisor \
|
|
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
|
|
|
|
FROM python-nginx
|
|
|
|
COPY manage.py wsgi.py ./
|
|
|
|
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"]
|