-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
44 lines (35 loc) · 967 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
33
34
35
36
37
38
39
40
41
42
43
44
SHELL = /bin/bash
COMPOSE = compose
define compose-file
-f $(COMPOSE)/docker-compose.$(1).yml
endef
VMC = $(call compose-file,postgresql) \
$(call compose-file,elastalert) \
$(call compose-file,hive) \
$(call compose-file,elk) \
$(call compose-file,vmc) \
$(call compose-file,ralph) \
--env-file .env
.PHONY: up
up:
sudo sysctl -w vm.max_map_count=262144
docker compose $(VMC) config
docker compose $(VMC) up
demodata:
@chmod +x config/demo_data.sh
@config/demo_data.sh
down:
docker compose $(VMC) down
clean-images:
@echo "Deleting all containers"
docker rm -f `docker ps -a -q` 2>/dev/null; true
@echo "Deleting all images"
docker rmi -f `docker images -q` 2>/dev/null; true
clean-volumes:
@echo "Deleting all volumes"
echo "y" | docker volume prune
clean: clean-images clean-volumes
@echo "Deleting all networks"
echo "y" | docker network prune
@echo "Cleaning the rest"
echo "y" | docker system prune