-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (42 loc) · 1.42 KB
/
Copy pathMakefile
File metadata and controls
49 lines (42 loc) · 1.42 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
.PHONY: help setup start stop restart startd clean
# Default target
help:
@echo "Makefile commands:"
@echo " setup - Build and start the development environment"
@echo " start - Start the development environment"
@echo " startd - Start the environment in detached mode"
@echo " stop - Stop the development environment"
@echo " restart - Restart the development environment"
@echo " clean - Stop and remove all containers, networks, and volumes"
# Setup environment
setup:
@echo "Setting up keepler development environment..."
@sh ./scripts/setup.sh
# Start development environment
start:
@echo "Starting keepler..."
@docker-compose -f docker-compose.dev.yml up
# Detached start
startd:
@echo "Starting keepler in detached mode..."
@docker-compose -f docker-compose.dev.yml up -d
# Stop development environment
stop:
@echo "Stopping keepler..."
@docker-compose -f docker-compose.dev.yml down
# Restart services
restart:
@echo "Restarting keepler..."
@docker-compose -f docker-compose.dev.yml restart
# Clean up
clean:
@echo "Cleaning up keepler..."
@echo "This will remove all containers, networks, images, and volumes associated with keepler."
@echo "Are you sure? (y/N)"
@read ans; \
if [ "$$ans" = "y" ] || [ "$$ans" = "Y" ]; then \
docker-compose -f docker-compose.dev.yml down --rmi all --volumes --remove-orphans; \
echo "Cleanup completed."; \
else \
echo "Cleanup aborted."; \
fi