-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (41 loc) · 1.74 KB
/
Copy pathMakefile
File metadata and controls
54 lines (41 loc) · 1.74 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
# =============================================================================
# Makefile – Common commands for Modded Minecraft Server
# =============================================================================
.DEFAULT_GOAL := help
.PHONY: help install setup start stop restart logs backup status shell rcon clean
help: ## Show this help message
@echo ""
@echo " Modded Minecraft Server – Available Commands"
@echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-12s\033[0m %s\n", $$1, $$2}'
@echo ""
install: ## Bootstrap the system (run once, requires sudo)
@sudo bash install.sh
setup: ## Interactive modpack setup wizard
@bash scripts/setup-modpack.sh
start: ## Start the Minecraft server
@bash scripts/start.sh
stop: ## Gracefully stop the Minecraft server
@bash scripts/stop.sh
restart: ## Restart the Minecraft server
@bash scripts/restart.sh
logs: ## Tail the server logs (Ctrl+C to exit)
@bash scripts/logs.sh
backup: ## Run a manual backup now
@bash scripts/backup.sh
status: ## Show container status and health
@docker compose ps
@echo ""
@docker compose stats --no-stream --no-trunc
shell: ## Open a bash shell inside the running container
@docker compose exec mc bash
rcon: ## Open an interactive RCON console
@docker compose exec mc rcon-cli \
--port $${RCON_PORT:-25575} \
--password $${RCON_PASSWORD:-changeme_rcon_password}
clean: ## Remove stopped containers, dangling images, and build cache
@docker compose down --remove-orphans
@docker image prune -f
@docker builder prune -f
@echo "Cleaned up Docker resources."