-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
40 lines (28 loc) · 933 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
UID=$(shell id -u)
GID=$(shell id -g)
DOCKER_PHP_SERVICE=php
PWD=`pwd`
start: erase cache-folders build composer-install up bash
erase:
docker-compose down -v
build:
docker-compose build && \
docker-compose pull
up:
docker-compose up -d
down:
docker-compose down
cache-folders:
mkdir -p ~/.composer && chown ${UID}:${GID} ~/.composer
composer-install:
docker-compose run --rm -u ${UID}:${GID} ${DOCKER_PHP_SERVICE} composer install
bash:
docker-compose run --rm -u ${UID}:${GID} ${DOCKER_PHP_SERVICE} bash
logs:
docker-compose logs -f ${DOCKER_PHP_SERVICE}
unit-tests:
docker-compose run --rm -u ${UID}:${GID} ${DOCKER_PHP_SERVICE} phpunit --testsuite 'Unit Tests'
integration-tests:
docker-compose run --rm -u ${UID}:${GID} ${DOCKER_PHP_SERVICE} phpunit --testsuite 'Integration Tests' --no-coverage
static-code-analysis:
sh -c "docker run --rm -v ${PWD}:/app phpstan/phpstan analyse ./src -l 5"