forked from sbodak/open-loyalty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
88 lines (66 loc) · 2.45 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
# which service (from docker-compose.yml:services) to run commands agains
SERVICE ?=
EXEC_ARGS ?=
RUN_ARGS ?=
BUILD_ARGS ?=
TEST_ARGS ?=
COMPOSE_FILE_ARGS ?= -f docker/docker-compose.yml
DOCKER_COMPOSE_LOCAL = docker/docker-compose.local.yml
ifeq ($(shell test -f $(DOCKER_COMPOSE_LOCAL) && echo yes),yes)
COMPOSE_FILE_ARGS := -f docker/docker-compose.local.yml
endif
DOCKER_COMPOSE = docker-compose $(COMPOSE_FILE_ARGS)
run:
$(DOCKER_COMPOSE) up -d $(RUN_ARGS)
logs:
$(DOCKER_COMPOSE) logs --tail=100 -f
build:
$(DOCKER_COMPOSE) up -d --build --force-recreate
stop:
$(DOCKER_COMPOSE) stop
restart:
$(DOCKER_COMPOSE) restart $(SERVICE)
clean:
- $(DOCKER_COMPOSE) down
exec: run
$(DOCKER_COMPOSE) exec $(SERVICE) $(EXEC_ARGS)
backend: run
$(DOCKER_COMPOSE) exec php bash
frontend: run
$(DOCKER_COMPOSE) exec frontend bash
ps:
$(DOCKER_COMPOSE) ps
composer-install: run
$(DOCKER_COMPOSE) exec -T php composer install
install: run
$(DOCKER_COMPOSE) exec -T php phing setup
$(DOCKER_COMPOSE) exec -T php bin/console cache:clear
$(DOCKER_COMPOSE) exec -T php chown -R www-data:www-data var/
cache-clear: run
$(DOCKER_COMPOSE) exec -T php bin/console cache:clear
$(DOCKER_COMPOSE) exec -T php chown -R www-data:www-data var/
ci-setup-test: run
$(DOCKER_COMPOSE) exec -T php phing ci-setup-test
test-security: run
$(DOCKER_COMPOSE) exec -T php phing test-security
test: run
$(DOCKER_COMPOSE) exec -T php phing generate-jwt-keys
$(DOCKER_COMPOSE) exec -T php bin/console doctrine:schema:drop --env=test --force
$(DOCKER_COMPOSE) exec -T php bin/console doctrine:schema:create --env=test
$(DOCKER_COMPOSE) exec -T php bin/console oloy:user:projections:index:create --drop-old
$(DOCKER_COMPOSE) exec -T php bin/console doctrine:schema:update --env=test -n --force
$(DOCKER_COMPOSE) exec -T php bin/console broadway:event-store:schema:drop
$(DOCKER_COMPOSE) exec -T php bin/console broadway:event-store:schema:init
$(DOCKER_COMPOSE) exec -T php bin/console doctrine:fixtures:load --env=test -n
$(DOCKER_COMPOSE) exec -T php bin/console assets:install --env=test
$(DOCKER_COMPOSE) exec -T php bin/console doctrine:schema:validate --env=test --skip-sync
$(DOCKER_COMPOSE) exec -T php bash -c "SYMFONY_DEPRECATIONS_HELPER=disabled vendor/phpunit/phpunit/phpunit -d memory_limit=-1 $(TEST_ARGS)"
# compatibility to pre docker-compose rules & aliases
$(RUN_IMAGE): run
$(BUILD_IMAGE): image
start: run
cli: bash
update: image clean run
# all is phony...
.PHONY: %
.DEFAULT: run