-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
95 lines (76 loc) · 3.07 KB
/
Copy pathMakefile
File metadata and controls
95 lines (76 loc) · 3.07 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
.PHONY: up down ps logs config restart clean dirs download scan urls verify help \
vpn-up remote-up maintenance-up backup bootstrap-prowlarr
COMPOSE = docker compose
help:
@echo "mangablitz - Kavita + *arr manga/books library"
@echo ""
@echo "Targets:"
@echo " up Start the full stack (detached)"
@echo " down Stop and remove containers"
@echo " ps Show container status"
@echo " logs Tail logs (all services)"
@echo " logs S=name Tail logs for one service (e.g. make logs S=prowlarr)"
@echo " config Validate docker-compose.yml (no deploy)"
@echo " restart down + up"
@echo " clean down + remove config/* (WARNING: deletes app configs; keeps data/media)"
@echo " dirs Ensure config/ and data/ trees + .env exist"
@echo " urls Print every service web UI"
@echo " download Download manga via mloader. Usage: make download URL=<mplus-url> [LAST=1]"
@echo " scan Show mounted media inside containers (library scan proof)"
@echo " verify Full end-to-end Phase-1 verification"
@echo ""
@echo "Optional / Phase-2:"
@echo " vpn-up Start stack with qBittorrent behind gluetun VPN"
@echo " remote-up Start stack + Tailscale (HTTPS remote access)"
@echo " maintenance-up Start stack + Diun (image-update notifications)"
@echo " backup Back up config/ to ./backups (brains only, not media)"
@echo " bootstrap-prowlarr Inventory + ensure qBittorrent client in Prowlarr"
@echo ""
dirs:
mkdir -p config/prowlarr config/qbittorrent config/kapowarr config/lazylibrarian config/flaresolverr
mkdir -p data/torrents/comics data/torrents/books data/media/manga data/media/books
mkdir -p kavita-config
@[ -f .env ] || { cp .env.example .env && echo "Created .env from .env.example"; }
up: dirs
$(COMPOSE) up -d
down:
$(COMPOSE) down
ps:
$(COMPOSE) ps
logs:
$(COMPOSE) logs --tail 100 -f $(S)
config:
$(COMPOSE) config
restart: down up
# Removes per-app configs (forces fresh first-run wiring). Does NOT touch
# data/media (your imported manga/books) or data/torrents.
clean: down
$(COMPOSE) down -v
find config -mindepth 2 ! -name '.gitkeep' -delete 2>/dev/null || true
urls:
@echo "Kavita (reader) http://localhost:5000"
@echo "Prowlarr (indexers) http://localhost:9696"
@echo "qBittorrent (DL) http://localhost:8080"
@echo "Kapowarr (comics) http://localhost:5656"
@echo "LazyLibrarian (books) http://localhost:5299"
@echo "FlareSolverr (API) http://localhost:8191"
download: dirs
@if [ -z "$(URL)" ]; then \
echo "Usage: make download URL=https://mangaplus.shueisha.co.jp/titles/XXXX [LAST=1]"; \
exit 1; \
fi
@bash scripts/download-chapter.sh "$(URL)" $(if $(LAST),--last,)
scan:
@bash scripts/scan-library.sh
verify:
@bash scripts/verify-phase1.sh
vpn-up: dirs
$(COMPOSE) -f docker-compose.yml -f docker-compose.vpn.yml up -d
remote-up: dirs
$(COMPOSE) --profile remote up -d
maintenance-up: dirs
$(COMPOSE) --profile maintenance up -d
backup:
@bash scripts/backup-config.sh $(DEST)
bootstrap-prowlarr:
@bash scripts/bootstrap-prowlarr.sh