forked from GCTC-NTGC/TalentCloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (38 loc) · 1.52 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
# Makefile for Docker Nginx PHP Composer MySQL
# include .env
# MySQL
DB_DUMPS_DIR=database/db/dumps
ROOT=/var/www
build-db:
@docker exec talentcloud sh -c "php artisan migrate:fresh"
@docker exec talentcloud-db sh -c "psql -U talentcloud -f /manual_db/insert-data.sql"
@docker exec talentcloud sh -c "php artisan db:seed"
clean:
@rm -Rf database/db/pgsql/*
@rm -Rf vendor/
@rm -Rf composer.lock
@rm -Rf etc/ssl/*
@rm -Rf report/*
code-sniff:
@docker-compose exec -T talentcloud ./vendor/bin/phpcs --config-set ignore_errors_on_exit 1
@docker-compose exec -T talentcloud ./vendor/bin/phpcs --config-set ignore_warnings_on_exit 1
@echo "Checking the standard code..."
@docker-compose exec -T talentcloud ./vendor/bin/phpcs -d memory_limit=512M -v --standard=PSR2 --extensions=php app/
docker-start:
@docker-compose up -d
docker-stop:
@docker-compose down -v
@make clean
gen-certs:
@docker run --rm -v $(shell pwd)/etc/ssl:/certificates -e "SERVER=talent.local.ca" jacoelho/generate-certificate
logs:
@docker-compose logs -f
phpmd:
@docker-compose exec -T talentcloud ./vendor/bin/phpmd /app \
text cleancode,codesize
set-root-perms:
@docker exec talentcloud sh -c "chgrp -R www-data ${ROOT}/storage ${ROOT}/bootstrap/cache"
@docker exec talentcloud sh -c "chmod -R g+w ${ROOT}/storage ${ROOT}/bootstrap/cache"
test: code-sniff
@docker-compose exec -T talentcloud ./vendor/bin/phpunit --colors=always --configuration ./
.PHONY: build-db clean code-sniff docker-start docker-stop gen-certs logs phpmd set-root-perms test