-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
45 lines (35 loc) · 1018 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
41
42
43
44
45
# Makefile
cmd=""
path="src"
OS := $(shell uname)
cp = ""
up:
docker-compose down && docker-compose -f docker-compose.yml up -d --remove-orphans --force-recreate
dockerFirstInit:
docker-compose build && make up
down:
docker-compose down
bash:
docker exec -it -u root app_php bash
log:
docker exec -it app_httpd bash -c 'tail -f /var/log/api_error.log'
init:
docker exec -it app_php bash -c 'composer install --prefer-dist \
&& php bin/console cache:clear'
load-fixtures:
docker exec -it app_php bash -c 'php bin/console doctrine:fixtures:load'
# exemple make sf cmd=cache:clear
sf:
docker exec -it app_php bash -c 'php bin/console $(cmd)'
sfCompo:
docker exec -it app_php bash -c 'composer req $(cp) -vvv'
phpcs:
docker exec -it app_php bash -c ' vendor/bin/php-cs-fixer fix $(path)'
mysql:
docker-compose exec mysql bash -c 'mysql -u root -proot -D app'
mysqlIp:
docker inspect app_mysql
logs:
make up && docker-compose logs -f
fixuser:
sudo groupadd docker && sudo usermod -aG docker $USER