forked from scandipwa/magento-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
64 lines (48 loc) · 2.38 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
# Define available commands
.PHONY: build full-rebuild push up recreate down cert pull \
down-rm-volumes applogs logs flushall core-up core-down core-logs \
exec
# Variables
current_dir := $(shell pwd)
uid := $(shell id -u)
gid := $(shell id -g)
# Warning! Do not use soft tabs!
up:
docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml up -d
core-up:
docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.core.yml -f docker-compose.ssl.yml up -d
build:
docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml build
pull:
docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml pull
down:
docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml down --remove-orphans
core-down:
docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.core.yml -f docker-compose.ssl.yml down --remove-orphans
down-rm-volumes:
docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml down -v
applogs:
docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml logs -f app
logs:
docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml logs -f
core-logs:
docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.core.yml -f docker-compose.ssl.yml logs -f --tail 100
full-rebuild:
docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.ssl.yml build --pull --no-cache
flushall:
docker-compose -f docker-compose.yml -f docker-compose.local.yml exec varnish varnishadm "ban req.url ~ /"
docker-compose -f docker-compose.yml -f docker-compose.local.yml exec redis redis-cli FLUSHALL
exec:
docker-compose -f docker-compose.yml -f docker-compose.local.yml -f docker-compose.core.yml -f docker-compose.ssl.yml exec -u user app $(filter-out $@,$(MAKECMDGOALS))
%:
@true
cert:
mkdir -p opt/cert
docker run -it --rm --init \
-e UID=$(uid) \
-e GID=$(gid) \
-w="/cert" \
--mount type=bind,source=$(current_dir)/deploy/shared/conf/local-ssl,target=/cert_config/ \
--mount type=bind,source=$(current_dir)/opt/cert,target=/cert \
--mount type=bind,source=$(current_dir)/deploy/create_certificates.sh,target=/usr/local/bin/create_certificates \
alpine:latest create_certificates