mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-23 08:11:17 +02:00
build Sphinx documentation and use php -S to actually view it
This commit is contained in:
@@ -3,6 +3,7 @@ WORKDIR /app
|
|||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y libzip-dev wget git-core python-pip \
|
&& apt-get install -y libzip-dev wget git-core python-pip \
|
||||||
&& docker-php-ext-install zip \
|
&& docker-php-ext-install zip \
|
||||||
&& pip install Sphinx
|
&& pip install Sphinx sphinx_rtd_theme
|
||||||
ADD . /app
|
ADD . /app
|
||||||
CMD [ "make", "cs", "test" ]
|
RUN cd /app && make cs test html
|
||||||
|
CMD [ "php", "-S", "0.0.0.0:80", "-t", "_build/html" ]
|
||||||
|
4
Makefile
4
Makefile
@@ -200,7 +200,7 @@ vendor: composer.phar
|
|||||||
php composer.phar install
|
php composer.phar install
|
||||||
|
|
||||||
cs: install
|
cs: install
|
||||||
./vendor/bin/phpcs -p --standard=PSR2 --ignore=vendor .
|
./vendor/bin/phpcs -p --standard=PSR2 --ignore=vendor,_build .
|
||||||
|
|
||||||
test: install cs
|
test: install
|
||||||
./vendor/bin/phpunit
|
./vendor/bin/phpunit
|
||||||
|
@@ -29,7 +29,7 @@ $ ./vendor/bin/phpunit
|
|||||||
|
|
||||||
## using Docker (optional)
|
## using Docker (optional)
|
||||||
|
|
||||||
You can optionally run tests using [Docker for Mac, Windows or Linux](https://docs.docker.com/compose/install/).
|
You can optionally build and browse the documentation using [Docker for Mac, Windows or Linux](https://docs.docker.com/compose/install/).
|
||||||
|
|
||||||
Just run:
|
Just run:
|
||||||
|
|
||||||
@@ -37,6 +37,8 @@ Just run:
|
|||||||
$ docker-compose up
|
$ docker-compose up
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Go to [http://localhost:8080/README.html](http://localhost:8080/README.html) to read the generated documentation.
|
||||||
|
|
||||||
To only install the dependencies, use `docker-compose` like this:
|
To only install the dependencies, use `docker-compose` like this:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@@ -4,5 +4,7 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
ports:
|
||||||
|
- "8080:80"
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
|
Reference in New Issue
Block a user