-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (50 loc) · 1.17 KB
/
Makefile
File metadata and controls
60 lines (50 loc) · 1.17 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
60
# Makefile
# Variables
COMPOSEYML = -f ./docker-compose.yml
COMPOSE = docker-compose $(COMPOSEYML)
# Default target
.PHONY: up
up:
@echo "Starting up containers..."
$(COMPOSE) up --build -d
.PHONY: down
down:
@echo "Stopping and removing containers..."
$(COMPOSE) down
.PHONY: logs
logs:
@echo "Displaying logs..."
$(COMPOSE) logs -f
.PHONY: ps
ps:
@echo "Listing containers..."
$(COMPOSE) ps
.PHONY: restart
restart:
@echo "Restarting containers..."
$(COMPOSE) restart
.PHONY: clean
clean:
@echo "Removing containers and networks..."
$(COMPOSE) down -v
.PHONY: build
build:
@echo "Building containers..."
$(COMPOSE) build
.PHONY: test # Run backend tests
test:
@echo "Running backend tests..."
$(COMPOSE) exec backend ./gradlew test
.PHONY: help
help:
@echo "Usage: make [target]"
@echo ""
@echo "Targets:"
@echo " up Start containers in detached mode with build"
@echo " down Stop and remove containers"
@echo " logs Display logs"
@echo " ps List containers"
@echo " restart Restart containers"
@echo " clean Remove containers and networks"
@echo " build Build containers"
@echo " help Display this help message"