forked from adosia/Heidrun
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
65 lines (50 loc) · 1.36 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
export COMPOSE_PROJECT_NAME=heidrun
export COMPOSE_FILE=docker/docker-compose.yml
.DEFAULT_GOAL := up
.PHONY: up
up:
$(MAKE) down
docker-compose up -d
$(MAKE) composer-install
./docker/wait-for-mysql.sh
$(MAKE) db-migrate
.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 heidrun-web bash -c "cd application && composer install && composer dump-auto"
.PHONY: db-migrate
db-migrate:
docker exec -it heidrun-web bash -c "cd application && php artisan migrate"
.PHONY: db-refresh
db-refresh:
docker exec -it heidrun-web bash -c "cd application && php artisan migrate:fresh --seed"
.PHONY: admin-account
admin-account:
docker exec -it heidrun-web bash -c "cd application && php artisan db:seed --class=AdminAccountSeeder"
.PHONY: status
status:
docker-compose ps
.PHONY: logs
logs:
docker-compose logs -f --tail=100
.PHONY: shell
shell:
docker exec -it heidrun-web bash
.PHONY: stats
stats:
docker stats heidrun-web heidrun-horizon heidrun-cron heidrun-mysql heidrun-redis
.PHONY: artisan
artisan:
docker exec -it heidrun-web bash -c "cd application && php artisan $(COMMAND)"
.PHONY: self-signed-ssl
self-signed-ssl:
cd ssl && openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout apache-cert.key -out apache-cert.crt