-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
80 lines (55 loc) · 1.93 KB
/
Copy pathMakefile
File metadata and controls
80 lines (55 loc) · 1.93 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
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
73
74
75
76
77
78
79
80
DOCKER_PREFIX=myproject
start: up
install: docker-update up copy-config composer-install npm-install build-grunt build-reactjs fixtures
up: docker-up
stop: docker-stop
# Docker
docker-update:
docker-compose -p $(DOCKER_PREFIX) pull
docker-up:
docker-compose -p $(DOCKER_PREFIX) up -d
docker-stop:
docker-compose -p $(DOCKER_PREFIX) stop
# Config
copy-config:
cp ./src/config.php.docker ./src/config.php
cp ./resources/reactjs/config/app/dev.config.json.docker ./resources/reactjs/config/app/dev.config.json
cp ./behat.yml.docker ./behat.yml
# PHP
composer-install:
docker exec -it $(DOCKER_PREFIX)_php_1 sh -c "composer install"
# JS
npm-install: npm-install-assets npm-install-reactjs
npm-install-assets:
docker exec -it $(DOCKER_PREFIX)_node_1 sh -c "npm install"
npm-install-reactjs:
docker exec -it $(DOCKER_PREFIX)_node_1 sh -c "cd resources/reactjs && npm install"
build: build-grunt build-reactjs
build-grunt:
docker exec -it $(DOCKER_PREFIX)_node_1 sh -c "./node_modules/.bin/grunt dev"
build-reactjs:
docker exec -it $(DOCKER_PREFIX)_node_1 sh -c "cd resources/reactjs && npm run webpack"
watch-grunt:
docker exec -it $(DOCKER_PREFIX)_node_1 sh -c "./node_modules/.bin/grunt watch:less"
watch-reactjs:
docker exec -it $(DOCKER_PREFIX)_node_1 sh -c "cd resources/reactjs && npm start"
test-reactjs:
docker exec -it $(DOCKER_PREFIX)_node_1 sh -c "cd resources/reactjs && npm test"
# Fixtures
fixtures:
docker exec -it $(DOCKER_PREFIX)_php_1 sh -c "./console mp:fixtures --use-cache -v"
fixtures-force:
docker exec -it $(DOCKER_PREFIX)_php_1 sh -c "./console mp:fixtures -v"
# Workers
workers-reload:
docker exec -it $(DOCKER_PREFIX)_workers_1 sh -c "supervisorctl -c /etc/supervisord.conf restart all"
# Shells
bash-php:
docker exec -it $(DOCKER_PREFIX)_php_1 bash
bash-node:
docker exec -it $(DOCKER_PREFIX)_node_1 bash
bash-db:
docker exec -it $(DOCKER_PREFIX)_db_1 bash
# Help
help:
@grep '^[^#[:space:]].*:' Makefile