-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
59 lines (52 loc) Β· 1.63 KB
/
Makefile
File metadata and controls
59 lines (52 loc) Β· 1.63 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.PHONY: init up down logs status clean help
# Default target
help:
@echo "Data Pro Stack - Available commands:"
@echo " make init - Initialize the environment (copy .env, check Docker)"
@echo " make up - Start the entire stack"
@echo " make down - Stop the entire stack"
@echo " make logs - View logs from all services"
@echo " make status - Show status of all services"
@echo " make clean - Stop and remove all containers and volumes"
@echo " make help - Show this help message"
# Initialize environment
init:
@echo "π§ Initializing Data Pro Stack..."
@if [ ! -f .env ]; then \
echo "π Creating .env file from template..."; \
cp env.example .env; \
echo "β
.env file created. Please review and modify if needed."; \
else \
echo "β
.env file already exists."; \
fi
@if ! docker info > /dev/null 2>&1; then \
echo "β Docker is not running. Please start Docker first."; \
exit 1; \
else \
echo "β
Docker is running."; \
fi
@echo "π Initialization complete!"
# Start the stack
up:
@echo "π Starting Data Pro Stack..."
@./start.sh
# Stop the stack
down:
@echo "π Stopping Data Pro Stack..."
@./stop.sh
# View logs
logs:
@echo "π Viewing logs from all services..."
@docker-compose logs -f
# Show status
status:
@echo "π Service Status:"
@echo "=================="
@docker-compose ps
# Clean everything (stop and remove volumes)
clean:
@echo "π§Ή Cleaning up everything..."
@echo "β οΈ This will remove all data volumes!"
@read -p "Are you sure? (y/N): " confirm && [ "$$confirm" = "y" ] || exit 1
@docker-compose down -v
@echo "β
All containers and volumes removed!"