1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2024-12-05 02:06:52 +00:00
plateforme-corres2math/Dockerfile

32 lines
831 B
Docker
Raw Normal View History

2020-09-20 20:31:37 +00:00
FROM python:3-alpine
2020-09-20 20:31:37 +00:00
ENV PYTHONUNBUFFERED 1
2020-09-20 20:31:37 +00:00
# Install LaTeX requirements
RUN apk add --no-cache gettext texlive nginx gcc libc-dev libffi-dev postgresql-dev mariadb-connector-c-dev
2020-09-20 20:31:37 +00:00
RUN apk add --no-cache bash
2020-09-20 20:31:37 +00:00
RUN mkdir /code
WORKDIR /code
COPY requirements.txt /code/requirements.txt
RUN pip install -r requirements.txt --no-cache-dir
2020-09-20 20:31:37 +00:00
COPY . /code/
2020-09-20 20:31:37 +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_corres2math.conf /etc/nginx/conf.d/corres2math.conf
RUN rm /etc/nginx/conf.d/default.conf
2020-09-20 20:31:37 +00:00
RUN cp /code/corres2math.cron /etc/crontabs/corres2math
2020-09-20 20:31:37 +00:00
# With a bashrc, the shell is better
RUN ln -s /code/.bashrc /root/.bashrc
2020-09-20 20:31:37 +00:00
ENTRYPOINT ["/code/entrypoint.sh"]
EXPOSE 80
CMD ["./manage.py", "shell_plus", "--ptpython"]