-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
76 lines (54 loc) · 2.4 KB
/
Makefile
File metadata and controls
76 lines (54 loc) · 2.4 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
## Based to some degree on https://www.strangebuzz.com/en/snippets/the-perfect-makefile-for-symfony
DOCKER_COMP = docker compose
DOCKER_BUILD = docker build
DOCKER_PUSH = docker push
SYMFONY_BIN = symfony
CONSOLE = $(SYMFONY_BIN) console
PHPUNIT = $(SYMFONY_BIN) php -dxdebug.mode=coverage bin/phpunit --testdox
## —— Symfony 🎵 ———————————————————————————————————————————————————————————————
sf: ## List all Symfony commands
@$(CONSOLE)
cc: ## Clear the cache. DID YOU CLEAR YOUR CACHE????
@$(CONSOLE) cache:clear
cac: ## Clear ALL caches
@$(CONSOLE) cache:pool:clear --all
warmup: ## Warmup the cache
@$(CONSOLE) cache:warmup
## —— Symfony server 💻 ————————————————————————————————————————————————————————
cert-install: ## Install the local HTTPS certificates
@$(SYMFONY_BIN) server:ca:install
proxy:
@$(SYMFONY_BIN) proxy:start
proxy-domain:
@$(SYMFONY_BIN) proxy:domain:attach omm
serveup:
@$(SYMFONY_BIN) server:start -d
servedown: ## Stop the webserver
@$(SYMFONY_BIN) server:stop
## —— Docker 🐳 ————————————————————————————————————————————————————————————————
up:
$(DOCKER_COMP) up --detach
down:
$(DOCKER_COMP) down
#upm: ## Same, but with MySQL config
# $(DOCKER_COMP) -f docker-compose.mysql.yml -f docker-compose.mysql.override.yml up --detach
upapp:
$(DOCKER_COMP) --env-file ./.env.docker.secrets -f docker-compose.yml -f docker-compose.app.yml up --detach
downapp:
$(DOCKER_COMP) -f docker-compose.yml -f docker-compose.app.yml down
buildapp:
$(DOCKER_BUILD) -t gothick/ommtest .
pushapp:
$(DOCKER_PUSH) gothick/ommtest
## -- Testing --
test:
$(PHPUNIT)
# NB Need to run the php process as www-data to match the file permissions, which are set
# up that way as we're running the webserver in the container as that user.
testapp:
$(DOCKER_COMP) -f docker-compose.yml -f docker-compose.app.yml exec -u www-data app ./testentrypoint.sh
shellapp:
$(DOCKER_COMP) -f docker-compose.yml -f docker-compose.app.yml exec app bash
# We're going to be doing this a lot for a while...
testtags:
$(PHPUNIT) --group tags