-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
58 lines (45 loc) · 1.24 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
SHELL := /bin/bash
MK_FILE_DIR=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
-include .env.local
-include .env
start:
docker-compose up -d
install:
cp .env .env.local ;\
make start
down:
docker-compose down
php:
docker-compose exec php sh
# restart docker compose
dk-rs:
docker-compose down && docker-compose up -d
# stop all containers, pull updates for images and restart
dk-update:
docker-compose down ;\
docker-compose pull ;\
# remove volume as it's being cached
docker volume prune -f || true ;\
docker-compose up -d ;\
# Clear unused images/volumes/containers
dk-clean:
# remove unused containers
docker ps -qa --no-trunc --filter "status=exited" | xargs docker rm || true ;\
# remove unused images
docker images -f "dangling=true" -q | xargs docker rmi || true ;\
# remove unused volumes
docker volume prune -f || true ;\
update-sf: disable-xdebug
make composer-install ;\
make migrate ;\
# BO recreate database, run migrations
reset-sf: disable-xdebug
make composer-install ;\
make reset-db;\
# xdebug causes performance issues, disable it for commands,migrations etc
disable-xdebug:
docker exec -i php dxd || true ;\
enable-xdebug:
docker exec -i php exd || true ;\
composer-install:
docker exec -i php composer install ;\