|
| 1 | +.ONESHELL: |
| 2 | +SHELL := /bin/bash |
| 3 | + |
| 4 | +DOCKER_RUN_PHP = docker compose -f .docker/compose.yaml run --rm php "bash" "-c" |
| 5 | +DOCKER_COMPOSE = docker compose -f .docker/compose.yaml |
| 6 | + |
| 7 | +start: upd #[Global] Start application |
| 8 | + |
| 9 | +src/vendor: #[Composer] install dependencies |
| 10 | + $(DOCKER_RUN_PHP) "composer install --no-interaction" |
| 11 | + |
| 12 | +upd: #[Docker] Start containers detached |
| 13 | + touch .docker/.env |
| 14 | + make src/vendor |
| 15 | + $(DOCKER_COMPOSE) up --remove-orphans --detach |
| 16 | + |
| 17 | +up: #[Docker] Start containers |
| 18 | + touch .docker/.env |
| 19 | + make src/vendor |
| 20 | + $(DOCKER_COMPOSE) up --remove-orphans |
| 21 | + |
| 22 | +stop: #[Docker] Down containers |
| 23 | + $(DOCKER_COMPOSE) stop |
| 24 | + |
| 25 | +down: #[Docker] Down containers |
| 26 | + $(DOCKER_COMPOSE) down |
| 27 | + |
| 28 | +build: #[Docker] Build containers |
| 29 | + $(DOCKER_COMPOSE) build |
| 30 | + |
| 31 | +ps: # [Docker] Show running containers |
| 32 | + $(DOCKER_COMPOSE) ps |
| 33 | + |
| 34 | +bash: #[Docker] Connect to php container with current host user |
| 35 | + $(DOCKER_COMPOSE) exec php bash |
| 36 | + |
| 37 | +logs: #[Docker] Show logs |
| 38 | + $(DOCKER_COMPOSE) logs -f |
| 39 | + |
| 40 | +quality: phpstan php-cs-fixer rector #[Quality] Run all quality checks |
| 41 | + |
| 42 | +phpstan: #[Quality] Run PHPStan |
| 43 | + $(DOCKER_RUN_PHP) "vendor/bin/phpstan --no-progress --memory-limit=1G analyse" |
| 44 | + |
| 45 | +php-cs-fixer: #[Quality] Run PHP-CS-Fixer |
| 46 | + $(DOCKER_RUN_PHP) "vendor/bin/php-cs-fixer fix --diff --verbose" |
| 47 | + |
| 48 | +rector: #[Quality] Run Rector |
| 49 | + $(DOCKER_RUN_PHP) "vendor/bin/rector" |
| 50 | + |
| 51 | +tests: phpunit #[Tests] Run all tests |
| 52 | + |
| 53 | +phpunit: #[Tests] Run PHPUnit |
| 54 | + $(DOCKER_RUN_PHP) "vendor/bin/phpunit" |
0 commit comments