2020-06-03 18:42:12 +00:00
|
|
|
FROM python:3-alpine
|
2020-04-29 00:24:12 +00:00
|
|
|
|
|
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
|
2020-06-03 18:42:12 +00:00
|
|
|
# Install LaTeX requirements
|
2020-07-13 19:27:36 +00:00
|
|
|
RUN apk add --no-cache gettext texlive nginx gcc libc-dev libffi-dev postgresql-dev mariadb-connector-c-dev
|
2020-06-03 18:42:12 +00:00
|
|
|
|
|
|
|
RUN apk add --no-cache bash
|
|
|
|
|
2020-04-29 00:24:12 +00:00
|
|
|
RUN mkdir /code
|
|
|
|
WORKDIR /code
|
2020-06-03 18:42:12 +00:00
|
|
|
COPY requirements.txt /code/requirements.txt
|
|
|
|
RUN pip install -r requirements.txt --no-cache-dir
|
2020-04-29 00:24:12 +00:00
|
|
|
|
|
|
|
COPY . /code/
|
|
|
|
|
2020-06-03 15:51:50 +00:00
|
|
|
# Configure nginx
|
2020-06-03 18:42:12 +00:00
|
|
|
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
|
2020-06-03 15:51:50 +00:00
|
|
|
|
2020-06-03 18:42:12 +00:00
|
|
|
# With a bashrc, the shell is better
|
|
|
|
RUN ln -s /code/.bashrc /root/.bashrc
|
2020-04-29 00:24:12 +00:00
|
|
|
|
|
|
|
ENTRYPOINT ["/code/entrypoint.sh"]
|
2020-06-03 15:51:50 +00:00
|
|
|
EXPOSE 80
|
2020-06-03 18:42:12 +00:00
|
|
|
|
|
|
|
CMD ["./manage.py", "shell_plus", "--ptpython"]
|