forked from drupal-composer/drupal-project
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
88 lines (65 loc) · 2.17 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
include .env
.PHONY: up down stop prune ps shell dbdump dbrestore uli cim cex
default: up
up:
@echo "Starting up containers for for $(PROJECT_NAME)..."
docker-compose pull
docker-compose up -d --remove-orphans
down:
@echo "Removing containers."
docker-compose down
stop:
@echo "Stopping containers for $(PROJECT_NAME)..."
@docker-compose stop
prune:
@echo "Removing containers for $(PROJECT_NAME)..."
@docker-compose down -v
ps:
@docker ps --filter name="$(PROJECT_NAME)*"
shell:
docker exec -ti $(shell docker ps --filter name='$(PROJECT_NAME)_php' --format "{{ .ID }}") sh
dbdump:
@echo "Creating Database Dump for $(PROJECT_NAME)..."
docker-compose run php drupal database:dump --file=../db/restore.sql --gz
dbrestore:
@echo "Restoring database..."
docker-compose run php drupal database:restore --file='/var/www/html/db/restore.sql.gz'
uli:
@echo "Getting admin login"
docker-compose run php drush user:login --uri="$(PROJECT_BASE_URL)":8000
cim:
@echo "Importing Configuration"
docker-compose run php drupal config:import -y
cex:
@echo "Exporting Configuration"
docker-compose run php drupal config:export -y
gm:
@echo "Displaying Generate Module UI"
docker-compose run php drupal generate:module
install-source:
@echo "Installing dependencies"
docker-compose run php composer install --prefer-source
install:
@echo "Installing dependencies"
docker-compose run php composer install
cr:
@echo "Clearing Drupal Caches"
docker-compose run php drupal cache:rebuild all
logs:
@echo "Displaying past containers logs"
docker-compose logs
logsf:
@echo "Follow containers logs output"
docker-compose logs -f
dbclient:
@echo "Opening DB client"
docker-compose run php drupal database:client
behat:
@echo "Running behat tests"
docker-compose run php vendor/bin/behat
phpcs:
@echo "Running coding standards on custom code"
docker-compose run php vendor/bin/phpcs --standard=vendor/drupal/coder/coder_sniffer/Drupal web/modules/custom --ignore=*.min.js --ignore=*.min.css
phpcbf:
@echo "Beautifying custom code"
docker-compose run php vendor/bin/phpcbf --standard=vendor/drupal/coder/coder_sniffer/Drupal web/modules/custom --ignore=*.min.js --ignore=*.min.css