27 lines
667 B
Docker
27 lines
667 B
Docker
FROM python:3-buster
|
|
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
RUN mkdir /code
|
|
WORKDIR /code
|
|
|
|
# Install LaTeX requirements
|
|
RUN apt update && \
|
|
apt install -y gettext texlive-latex-extra texlive-fonts-extra texlive-lang-french nginx && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY . /code/
|
|
|
|
# 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
|
|
|
|
RUN pip install -r requirements.txt
|
|
|
|
ENTRYPOINT ["/code/entrypoint.sh"]
|
|
EXPOSE 80
|