-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
67 lines (49 loc) · 1.33 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
ENV_FILE ?= .env
ENV_LOCAL_FILE ?= .env.local
include $(ENV_FILE)
export $(shell grep -vE '^(#|$$)' $(ENV_FILE) | sed 's/=.*//')
ifneq ("$(wildcard $(ENV_LOCAL_FILE))","")
include $(ENV_LOCAL_FILE)
export $(shell grep -vE '^(#|$$)' $(ENV_LOCAL_FILE) | sed 's/=.*//')
endif
export HTTP_PORT ?= 80
dev-%: export COMPOSE_FILE = docker-compose.dev.yml
dev-%:
$(MAKE) $*
bash:
$(MAKE) shell
shell:
docker-compose exec -u www-data app bash
shell-root:
docker-compose exec app bash
pull:
docker-compose pull
build:
docker-compose build
start:
docker-compose up
startd:
docker-compose up -d
stop:
docker-compose stop
down:
docker-compose down --remove-orphans
logs:
docker-compose logs -f --tail=50
ps:
docker-compose ps
install:
bin/console doctrine:migrations:migrate --no-interaction
bin/console doctrine:fixtures:load --append
dev-install:
docker-compose exec app sh -c \
'composer install \
&& bin/console doctrine:database:create \
&& bin/console make:migration \
&& bin/console doctrine:migrations:migrate \
&& bin/console doctrine:fixtures:load --append \
&& yarn install'
dev-encore-watch:
test -f /.dockerenv && yarn run encore dev --watch || docker-compose exec app yarn run encore dev --watch
new-secret:
sed -i "s/APP_SECRET=.*/APP_SECRET=$$(openssl rand -base64 32 | md5sum | awk '{ print $$1 }')/" .env