-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
32 lines (25 loc) · 877 Bytes
/
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
DOCKER_COMPOSE_LINUX = docker compose
DOCKER_COMPOSE_MAC = docker-compose
# Check if docker-compose exists
DOCKER_COMPOSE_EXISTS := $(shell command -v docker-compose 2>/dev/null)
ifeq ($(DOCKER_COMPOSE_EXISTS),)
DOCKER_COMPOSE_CMD = $(DOCKER_COMPOSE_LINUX)
else
DOCKER_COMPOSE_CMD = $(DOCKER_COMPOSE_MAC)
endif
VOLUMES = ${USER}/volumes/db ${USER}/volumes/dependencies ${USER}/volumes/redis
all:
bash ./scripts/init.sh
$(DOCKER_COMPOSE_CMD) -f docker-compose.yml up --build -d --remove-orphans
clean:
@$(DOCKER_COMPOSE_CMD) down --remove-orphans --volumes
#docker volume rm $(docker volume ls -qf dangling=true)
fclean: clean
bash ./scripts/clean.sh
docker system prune --all --volumes --force
fclean-sudo: clean
sudo rm -rf ${USER}
sudo bash ./scripts/clean.sh
docker system prune --all --volumes --force
re: fclean all
.PHONY: all clean fclean re