-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (32 loc) · 1.07 KB
/
Makefile
File metadata and controls
44 lines (32 loc) · 1.07 KB
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
# Makefile for STOPRO Project
# Variables
DC = docker-compose
# Colors
GREEN = \033[0;32m
NC = \033[0m # No Color
.PHONY: help build start stop restart status logs clean
help: ## Show this help
@echo "Usage: make [target]"
@echo ""
@echo "Targets:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " ${GREEN}%-15s${NC} %s\n", $$1, $$2}'
build: ## Build all services
@echo "${GREEN}Building services...${NC}"
$(DC) build
start: ## Start all services in detached mode
@echo "${GREEN}Starting services...${NC}"
$(DC) up -d
stop: ## Stop all services
@echo "${GREEN}Stopping services...${NC}"
$(DC) down
restart: stop start ## Restart all services
rebuild: ## Force rebuild and start
@echo "${GREEN}Rebuilding and starting services...${NC}"
$(DC) up -d --build --force-recreate
status: ## Show status of containers
$(DC) ps
logs: ## Follow logs of all services
$(DC) logs -f
clean: ## Stop and remove containers, networks, images, and volumes
@echo "${GREEN}Cleaning up...${NC}"
$(DC) down -v --rmi all --remove-orphans