1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-26 06:22:22 +00:00
plateforme-tfjm2/Dockerfile

36 lines
915 B
Docker
Raw Normal View History

2020-12-27 10:49:54 +00:00
FROM python:3.8-alpine
ENV PYTHONUNBUFFERED 1
ENV DJANGO_ALLOW_ASYNC_UNSAFE 1
# Install LaTeX requirements
RUN apk add --no-cache gettext nginx gcc libc-dev libffi-dev libxml2-dev libxslt-dev postgresql-dev libmagic
RUN apk add --no-cache bash
RUN mkdir /code
WORKDIR /code
COPY requirements.txt /code/requirements.txt
RUN pip install -r requirements.txt --no-cache-dir
COPY . /code/
RUN python manage.py collectstatic --noinput && \
python manage.py compilemessages
# 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_tfjm.conf /etc/nginx/conf.d/tfjm.conf
RUN rm /etc/nginx/conf.d/default.conf
RUN crontab /code/tfjm.cron
# With a bashrc, the shell is better
RUN ln -s /code/.bashrc /root/.bashrc
ENTRYPOINT ["/code/entrypoint.sh"]
EXPOSE 80
2021-01-18 16:29:48 +00:00
CMD ["./manage.py", "shell_plus", "--ipython"]