-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
72 lines (56 loc) · 1.41 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
63
64
65
66
67
68
69
70
71
72
export COMPOSE_PROJECT_NAME=gatekeeper
export COMPOSE_FILE=docker/docker-compose.yml:docker/docker-compose.custom.yml
.PHONY: up
up:
$(MAKE) down
docker-compose up -d
$(MAKE) composer-install
./docker/wait-for-mysql.sh
$(MAKE) db-migrate
docker exec -it gatekeeper-web bash -c "npm install"
.PHONY: down
down:
docker-compose down --remove-orphans
.PHONY: build
build:
docker-compose build
$(MAKE) up
#
# Helper functions
#
.PHONY: composer-install
composer-install:
docker exec -it gatekeeper-web bash -c "composer install"
.PHONY: db-migrate
db-migrate:
docker exec -it gatekeeper-web bash -c "php artisan migrate"
.PHONY: db-refresh
db-refresh:
docker exec -it gatekeeper-web bash -c "php artisan migrate:fresh --seed"
.PHONY: tinker
tinker:
docker exec -it gatekeeper-web bash -c "php artisan tinker"
.PHONY: status
status:
docker-compose ps
.PHONY: logs
logs:
docker-compose logs -f --tail=100
.PHONY: shell
shell:
docker exec -it gatekeeper-web bash
.PHONY: stats
stats:
docker stats gatekeeper-web gatekeeper-mysql gatekeeper-redis
.PHONY: artisan
artisan:
docker exec -it gatekeeper-web bash -c "php artisan $(COMMAND)"
.PHONY: admin
admin:
docker exec -it gatekeeper-web bash -c "php artisan create:admin"
.PHONY: staff
staff:
docker exec -it gatekeeper-web bash -c "php artisan create:staff"
.PHONY: change-password
change-password:
docker exec -it gatekeeper-web bash -c "php artisan change:password"