-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
93 lines (76 loc) · 2.29 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
89
90
91
92
93
COMPOSE_FILES=./docker-compose.yml
POSTGRES_COMPOSE_FILES=./.docker/docker-compose-postgres.yml
ELASTIC_COMPOSE_FILES=./.docker/elk/docker-compose-elk.yml
help:
@echo "build"
@echo " Build docker image and start containers."
@echo ""
@echo "up"
@echo " Create and start containers."
@echo ""
@echo "up-graylog"
@echo " Create and up graylog"
@echo ""
@echo "recreate"
@echo " Force to recreate containers"
@echo ""
@echo "restart"
@echo " Restart containers."
@echo ""
@echo "status"
@echo " Shows the status of the current containers."
@echo ""
@echo "shell"
@echo " Starting a zsh shell as \"www-data\" user in web container."
@echo ""
@echo "shell-as-root"
@echo " Starting a bash shell as \"root\" user in web container."
@echo ""
@echo "destroy"
@echo " Stop and remove containers, networks, images, and volumes."
@echo ""
@echo "pull-git"
@echo " Pull git and submodule"
@echo ""
@echo "submodules"
@echo " Pull and update submodules"
@echo ""
@echo "destroy"
@echo " Stop and remove containers, networks, images, and volumes."
@echo ""
@echo "submodule-develop"
@echo " Checkout all submodule to develop branch"
@echo ""
@echo "submodule-master"
@echo " Checkout all submodule to master branch"
@echo ""
build:
docker compose -f $(COMPOSE_FILES) build --no-cache
up:
docker compose -f $(COMPOSE_FILES) -f $(POSTGRES_COMPOSE_FILES) -f $(ELASTIC_COMPOSE_FILES) up -d app redis postgres pgadmin elasticsearch
down:
docker compose -f $(COMPOSE_FILES) -f $(POSTGRES_COMPOSE_FILES) down
up-graylog:
docker compose -f $(COMPOSE_FILES) -f $(GRAYLOG_COMPOSE_FILES) up -d
restart:
docker compose -f $(COMPOSE_FILES) restart
recreate:
docker compose -f $(COMPOSE_FILES) up -d --force-recreate
status:
docker compose -f $(COMPOSE_FILES) ps
destroy:
docker compose -f $(COMPOSE_FILES) down
shell:
docker compose -f $(COMPOSE_FILES) exec --user=www-data app ash
shell-as-root:
docker compose -f $(COMPOSE_FILES) exec --user=root app ash
git:
git pull --recurse-submodules
submodules:
git submodule update --remote
submodule-develop:
git submodule foreach --recursive 'git checkout develop'
submodule-develop-rebase:
git submodule foreach --recursive 'git pull --rebase origin develop'
submodule-master:
git submodule foreach --recursive 'git checkout master'