cookiecutter-django/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile
Hannah Lazarus 3152bdaeb3 Add sphinx defaults for cookiecutter'd project
-serve, watch + live reload for docs + code file changes
-update project makefile + make.bat
-separate _source and _build
-add packages and paths to use autodoc
-edit/add documentation with examples (both at django-cookiecutter and inside generated project)
-add formatted comments in User model for pickup by Sphinx apidoc
-serve docs from a separate docs container for docker build
2020-04-30 13:23:24 -04:00

31 lines
977 B
Docker

FROM python:3.8-slim-buster
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
RUN apt-get update \
# dependencies for building Python packages
&& apt-get install -y build-essential \
# psycopg2 dependencies
&& apt-get install -y libpq-dev \
# Translations dependencies
&& apt-get install -y gettext \
# Enable Sphinx output to latex and pdf
&& apt-get install -y texlive-latex-recommended \
&& apt-get install -y texlive-fonts-recommended \
&& apt-get install -y texlive-latex-extra \
&& apt-get install -y latexmk \
# cleaning up unused files
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*
# Requirements are installed here to ensure they will be cached.
COPY ./requirements /requirements
# All imports needed for autodoc.
RUN pip install -r /requirements/local.txt
RUN pip install -r /requirements/production.txt
WORKDIR /docs
CMD make livehtml