Add "docs" service to for generating documentation with Sphinx

This commit is contained in:
PJ Dietz 2018-03-12 11:03:26 -04:00
parent e531af0da5
commit a9ba30fa79
5 changed files with 16 additions and 3 deletions

View File

@ -4,6 +4,13 @@ services:
php: php:
build: build:
context: . context: .
dockerfile: ./docker/Dockerfile dockerfile: ./docker/php/Dockerfile
volumes: volumes:
- .:/usr/local/src/wellrested - .:/usr/local/src/wellrested
docs:
build:
context: .
dockerfile: ./docker/docs/Dockerfile
volumes:
- .:/usr/local/src/wellrested

7
docker/docs/Dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM python:3-jessie
RUN pip install sphinx sphinx_rtd_theme
WORKDIR /usr/local/src/wellrested
CMD ["make", "html", "-C", "docs"]

View File

@ -15,7 +15,7 @@ RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini
# Download and install Composer # Download and install Composer
COPY ./docker/install-composer.sh /tmp/install-composer.sh COPY ./docker/php/install-composer.sh /tmp/install-composer.sh
RUN chmod +x /tmp/install-composer.sh; sync && \ RUN chmod +x /tmp/install-composer.sh; sync && \
/tmp/install-composer.sh && \ /tmp/install-composer.sh && \
rm /tmp/install-composer.sh rm /tmp/install-composer.sh

View File

@ -6,7 +6,6 @@ from pygments.lexers.web import PhpLexer
lexers['php'] = PhpLexer(startinline=True, linenos=1) lexers['php'] = PhpLexer(startinline=True, linenos=1)
lexers['php-annotations'] = PhpLexer(startinline=True, linenos=1) lexers['php-annotations'] = PhpLexer(startinline=True, linenos=1)
primary_domain = 'php'
# Add any Sphinx extension module names here, as strings. They can be # Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom