-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
56 lines (37 loc) · 1.23 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
.PHONY: all build start p stop down restart status logs migrate composer phpunit phpcs bash-php bash-nginx bash-db
PHP_SERVICE_NAME = youkok2-php
NGINX_SERVICE_NAME = youkok2-nginx
DB_SERVICE_NAME = youkok2-db
#####################################################################################################
# DEV #
#####################################################################################################
build:
@docker-compose build
start:
@docker-compose up -d
up: dev-start
stop:
@docker-compose stop
down:
@docker-compose down
restart: stop start
status:
@docker-compose ps
logs:
@docker-compose logs -f
migrate:
@docker-compose run --rm $(PHP_SERVICE_NAME) composer migrate
composer:
@docker-compose run --rm $(PHP_SERVICE_NAME) composer install
phpunit:
@docker-compose run --rm $(PHP_SERVICE_NAME) composer phpunit
phpcs:
@docker-compose run --rm $(PHP_SERVICE_NAME) composer phpcs
bash-php:
@docker-compose run --rm $(PHP_SERVICE_NAME) bash
bash-nginx:
@docker-compose run --rm $(NGINX_SERVICE_NAME) sh
bash-db:
@docker-compose run --rm $(DB_SERVICE_NAME) sh
install: composer migrate
upgrade: build restart