Simple way to generate 'PhpMetrics' reports
1.8K
Simply create a docker-compose.yml with the following service in it or add it to an existing one.
version: '2'
services:
metrics:
image: drupsys/phpmetrics
container_name: data-metrics
volumes:
- <your code>:/code/src
- <your code 2>:/code/app
- metrics:/usr/share/nginx/html
ports:
- "8088:80"
volumes:
metrics:
Create a Makefile with the following command or add the following command to existing Makefile.
report:
docker exec -it data-metrics phpmetrics --report-html="." /code
Open localhost:8088 in your browser
FROM nginx:1.15.1-alpine
ENV PHP_METRICS_VERSION=2.2.0
RUN apk update \
&& apk add curl \
&& apk add php7-cli \
&& apk add php7-phar \
&& apk add php7-json \
&& apk add php7-tokenizer \
&& curl -L https://github.com/phpmetrics/PhpMetrics/releases/download/v$PHP_METRICS_VERSION/phpmetrics.phar \
> /usr/local/bin/phpmetrics \
&& chmod +x /usr/local/bin/phpmetrics \
&& apk del curl \
&& rm -rf /var/cache/apk/* /var/tmp/*/tmp/*
COPY ./site.conf /etc/nginx/conf.d/default.conf
Content type
Image
Digest
Size
11 MB
Last updated
over 8 years ago
docker pull drupsys/phpmetrics