mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-23 00:01:22 +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 \
|
||||
&& apt-get install -y libzip-dev wget git-core python-pip \
|
||||
&& docker-php-ext-install zip \
|
||||
&& pip install Sphinx
|
||||
&& pip install Sphinx sphinx_rtd_theme
|
||||
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
|
||||
|
||||
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
|
||||
|
@@ -29,7 +29,7 @@ $ ./vendor/bin/phpunit
|
||||
|
||||
## 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:
|
||||
|
||||
@@ -37,6 +37,8 @@ Just run:
|
||||
$ 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:
|
||||
|
||||
```bash
|
||||
|
@@ -4,5 +4,7 @@ services:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "8080:80"
|
||||
volumes:
|
||||
- .:/app
|
||||
|
Reference in New Issue
Block a user