2020-04-29 00:24:12 +00:00
|
|
|
FROM python:3-buster
|
|
|
|
|
|
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
|
|
|
|
RUN mkdir /code
|
|
|
|
WORKDIR /code
|
|
|
|
|
|
|
|
# Install LaTeX requirements
|
|
|
|
RUN apt update && \
|
2020-06-03 15:51:50 +00:00
|
|
|
apt install -y gettext texlive-latex-extra texlive-fonts-extra texlive-lang-french nginx && \
|
2020-04-29 00:24:12 +00:00
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
COPY . /code/
|
|
|
|
|
2020-06-03 15:51:50 +00:00
|
|
|
# Configure nginx
|
|
|
|
RUN ln -s nginx_tfjm.conf /etc/nginx/sites-available/tfjm.conf
|
|
|
|
RUN rm /var/log/nginx/*.log
|
|
|
|
RUN ln -s /dev/stdout /var/log/nginx/access.log
|
|
|
|
RUN ln -s /dev/stderr /var/log/nginx/error.log
|
|
|
|
RUN rm /etc/nginx/sites-enabled/default
|
|
|
|
RUN ln -sf /code/nginx_tfjm.conf /etc/nginx/sites-enabled/tfjm.conf
|
|
|
|
|
2020-04-29 00:24:12 +00:00
|
|
|
RUN pip install -r requirements.txt
|
|
|
|
|
|
|
|
ENTRYPOINT ["/code/entrypoint.sh"]
|
2020-06-03 15:51:50 +00:00
|
|
|
EXPOSE 80
|