Handle SIGTERM to stop Minecraft gracefully
- Set up SIGTERM signal trap to invoke stop_server - Ensure proper process exit and cleanup after the server stops - Create makefile to build, clean, and install builds
This commit is contained in:
17
Makefile
Normal file
17
Makefile
Normal file
@@ -0,0 +1,17 @@
|
||||
CONTAINER = minecraft-minecraft-1
|
||||
|
||||
.PHONY: default build clean install
|
||||
default: build
|
||||
|
||||
build:
|
||||
docker compose build
|
||||
|
||||
clean:
|
||||
rm -f screenlog.0
|
||||
docker compose down --rmi all
|
||||
docker builder prune -f
|
||||
|
||||
install: build
|
||||
touch screenlog.0
|
||||
docker compose up -d && \
|
||||
docker logs -f $(CONTAINER)
|
Reference in New Issue
Block a user