-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathmakefile
More file actions
34 lines (26 loc) · 749 Bytes
/
makefile
File metadata and controls
34 lines (26 loc) · 749 Bytes
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
DOCKER_COMPOSE_COMMAND=$(shell sh/prepare.sh)
DOCKER_IN_GROUPS=$(shell groups | grep "docker")
LOCAL_UID=$(shell id -u)
all: root_check run_pull run_build logs
build: root_check run_pull run_build
restart: run_restart
fromscratch: root_check run_remove run_pull run_build
remove: root_check run_remove
root_check:
@if [ "${LOCAL_UID}" = "0" ]; then \
echo Please do not run as root. It is neither recommended nor would it work.; \
fi
@exit
prep:
sh/prepare.sh
run_pull:
$(DOCKER_COMPOSE_COMMAND) pull
run_build:
${DOCKER_COMPOSE_COMMAND} up --build -d
run_remove:
$(DOCKER_COMPOSE_COMMAND) down --rmi all
$(DOCKER_COMPOSE_COMMAND) rm --force
run_restart:
$(DOCKER_COMPOSE_COMMAND) restart
logs:
$(DOCKER_COMPOSE_COMMAND) logs -f