1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-12-27 01:42:22 +00:00
nk20/Dockerfile

28 lines
851 B
Docker
Raw Normal View History

2020-06-21 18:27:42 +00:00
FROM python:3-alpine
2020-02-03 10:50:42 +00:00
ENV PYTHONUNBUFFERED 1
2020-06-21 18:27:42 +00:00
# Install LaTeX requirements
RUN apk add --no-cache gettext texlive texmf-dist-latexextra texmf-dist-fontsextra nginx gcc libc-dev libffi-dev postgresql-dev libxml2-dev libxslt-dev jpeg-dev
2020-02-03 10:50:42 +00:00
2020-06-21 18:27:42 +00:00
RUN apk add --no-cache bash
2020-02-03 10:50:42 +00:00
2020-06-21 18:27:42 +00:00
RUN mkdir /code
WORKDIR /code
COPY requirements /code/requirements
RUN pip install gunicorn ptpython --no-cache-dir
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-03-10 22:37:54 +00:00
COPY . /code/
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"]