-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (34 loc) · 862 Bytes
/
Makefile
File metadata and controls
45 lines (34 loc) · 862 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
35
36
37
38
39
40
41
42
43
44
45
PROJ_NAME=inception
COMPOSE_FILE=./srcs/docker-compose.yml
all: help
help:
@echo "make help"
@echo "make build"
@echo "make up"
@echo "make stop"
@echo "make down"
@echo "make logs"
@echo "make clean"
build:
@echo "Building the project"
@docker compose -f $(COMPOSE_FILE) build
up: build
@echo "Starting the project"
@docker compose -f $(COMPOSE_FILE) up -d
down:
@echo "Stopping the project"
@docker compose -f $(COMPOSE_FILE) down
logs:
@echo "Showing the logs"
@docker compose -f $(COMPOSE_FILE) logs
stop:
@echo "Stopping the project"
@docker compose -f $(COMPOSE_FILE) stop
clean: down
@docker system prune -f
@docker volume prune -f
sudo rm -rf /home/$(USER)/data
re: down up
start: clean up
health:
@dofrcker ps -a | grep $(PROJ_NAME) | awk '{print $$1}' | xargs docker inspect --format='{{.State.Health.Status}} {{.Name}}'