-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (29 loc) · 1.01 KB
/
Makefile
File metadata and controls
39 lines (29 loc) · 1.01 KB
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
export UID
export GID
.PHONY = clean test install stop start build composer-install refresh-db
ENVIRON ?= "dev"
COMPOSEFILE = "./environment/$(ENVIRON)/docker-compose.yml"
clean:
@docker-compose -f ${COMPOSEFILE} down --remove-orphans
build:
$(info Make: Building environment images.)
@docker-compose -f ${COMPOSEFILE} up --build --force-recreate -d
start:
$(info Make: Start docker containers.)
@docker-compose -f ${COMPOSEFILE} up -d
@echo 'ok'
stop:
$(info Make: Stop docker containers.)
@docker-compose -f ${COMPOSEFILE} stop
composer-install:
$(info Make: Install composer dependencies.)
@docker exec -it openrpg-webapp sh -c "composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist"
refresh-db:
$(info Make: Reset & refresh db)
@docker exec -it openrpg-webapp sh -c "php artisan migrate:fresh && php artisan db:seed"
test:
$(info Make: Test)
@docker exec -it openrpg-webapp sh -c "./vendor/bin/phpunit"
install:
@make -s build
@make -s composer-install