2020-09-01 09:23:56 +00:00
|
|
|
FROM debian:buster
|
2020-02-03 10:50:42 +00:00
|
|
|
|
2020-09-01 09:23:56 +00:00
|
|
|
# Force the stdout and stderr streams to be unbuffered
|
2020-02-03 10:50:42 +00:00
|
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
|
2020-09-01 09:23:56 +00:00
|
|
|
# Install APT requirements
|
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y nginx python3 python3-pip python3-dev \
|
|
|
|
uwsgi uwsgi-plugin-python3 python3-venv git acl gettext \
|
|
|
|
libjs-bootstrap4 fonts-font-awesome \
|
|
|
|
texlive-latex-extra texlive-fonts-extra texlive-lang-french && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
2020-02-03 10:50:42 +00:00
|
|
|
|
2020-09-01 09:23:56 +00:00
|
|
|
# Instal PyPI requirements
|
2020-06-21 18:27:42 +00:00
|
|
|
COPY requirements /code/requirements
|
|
|
|
RUN pip install -r requirements/base.txt -r requirements/cas.txt -r requirements/production.txt --no-cache-dir
|
2020-03-21 08:22:38 +00:00
|
|
|
|
2020-09-01 09:23:56 +00:00
|
|
|
# Copy code
|
|
|
|
WORKDIR /code
|
2020-03-10 22:37:54 +00:00
|
|
|
COPY . /code/
|
|
|
|
|
2020-09-01 09:23:56 +00:00
|
|
|
#RUN pip install gunicorn ptpython --no-cache-dir
|
|
|
|
|
2020-06-21 18:27:42 +00:00
|
|
|
# Configure nginx
|
|
|
|
RUN mkdir /run/nginx
|
|
|
|
RUN ln -sf /dev/stdout /var/log/nginx/access.log && ln -sf /dev/stderr /var/log/nginx/error.log
|
|
|
|
RUN ln -sf /code/nginx_note.conf_docker /etc/nginx/conf.d/nginx_note.conf
|
|
|
|
RUN rm /etc/nginx/conf.d/default.conf
|
2020-02-03 10:50:42 +00:00
|
|
|
|
|
|
|
ENTRYPOINT ["/code/entrypoint.sh"]
|
2020-06-21 18:27:42 +00:00
|
|
|
EXPOSE 80
|
|
|
|
|
|
|
|
CMD ["./manage.py", "shell_plus", "--ptpython"]
|