-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (33 loc) · 1.03 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
all: help
.PHONY: help status build composer-install build-container start stop shell test
current-dir := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
help: Makefile
@sed -n 's/^##//p' $<
## build: Start container and install packages
build: build-container start composer-install
## install: Install packages
composer-install:
@docker-compose exec app composer install
##build-container Rebuild a container
build-container:
@docker-compose up --build --force-recreate --no-deps -d
## start: Start container
start:
@docker-compose up -d
## stop: Stop containers
stop:
@docker-compose stop
## down: Stop containers and remove stopped containers and any network created
down:
@docker-compose down
## destroy: Stop containers and remove its volumes (all information inside volumes will be lost)
destroy:
@docker-compose down -v
## shell: Interactive shell inside docker
shell:
@docker-compose exec app sh
## restart: Start container
restart: destroy start
## tests
tests:
@docker-compose exec app php vendor/bin/phpunit test/