-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (51 loc) · 2.21 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
53
54
55
56
57
58
59
60
61
62
# Start dev environment
up:
docker-compose -f .docker/docker-compose.yml up -d --remove-orphans;
@echo 'App is running on http://localhost';
# Start dev environment with forced build
up\:build:
docker-compose -f .docker/docker-compose.yml up -d --build;
# Stop dev environment
down:
docker-compose -f .docker/docker-compose.yml down;
# Show logs - format it using less
logs:
docker-compose -f .docker/docker-compose.yml logs -f --tail=10 | less -S +F;
# Exec sh on php container
exec\:php:
docker-compose -f .docker/docker-compose.yml exec php sh;
init:
docker-compose -f .docker/docker-compose.yml exec php composer install;
docker-compose -f .docker/docker-compose.yml exec php bin/console orm:schema-tool:drop --force --full-database;
docker-compose -f .docker/docker-compose.yml exec php bin/console orm:schema-tool:create;
docker-compose -f .docker/docker-compose.yml exec php bin/console doctrine:fixtures:load --no-interaction --append;
diff:
docker-compose -f .docker/docker-compose.yml exec php rm -rf temp/cache
docker-compose -f .docker/docker-compose.yml exec php bin/console orm:schema-tool:drop --force --full-database;
docker-compose -f .docker/docker-compose.yml exec php bin/console migrations:migrate --allow-no-migration --no-interaction;
docker-compose -f .docker/docker-compose.yml exec php bin/console migrations:diff;
# git add migrations/*
make init
cache:
docker-compose -f .docker/docker-compose.yml exec php rm -rf temp/cache
# rebuild database (containers etc.)
reset:
docker-compose -f .docker/docker-compose.yml exec php rm -rf .docker/data/db
make down
make up
make cache
# for this you can use makefile or git alias
load:
docker-compose -f .docker/docker-compose.yml exec php composer dump-autoload
# first step after git clone
start:
make up:build
make up
docker-compose -f .docker/docker-compose.yml exec php composer install
docker-compose -f .docker/docker-compose.yml exec php chmod 777 temp
docker-compose -f .docker/docker-compose.yml exec php chmod 777 log
docker-compose -f .docker/docker-compose.yml exec php chmod 777 bin/console
make init
fix:
# phpstan -l (level 0-9, max - newest)
docker-compose -f .docker/docker-compose.yml exec php vendor/bin/phpstan analyse app -l max