Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
140 lines (113 loc) · 4.79 KB
/
Copy pathMakefile
File metadata and controls
140 lines (113 loc) · 4.79 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
.PHONY: up down ps logs config restart clean dirs download scan scan-kavita urls verify help \
movies-up movies-down vpn-up remote-up maintenance-up backup bootstrap-prowlarr bootstrap-mam wire-mam bootstrap-bjshare wire-bjshare bootstrap-pi
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 Compare on-disk media vs Kavita index + mount check"
@echo " scan-kavita Trigger Kavita scan-all (needs KAVITA_PASS=...)"
@echo " verify Full end-to-end Phase-1 verification"
@echo ""
@echo "Optional / Phase-2:"
@echo " movies-up Start only Jellyfin for LG TV playback (see docs/JELLYFIN-LG-TV.md)"
@echo " movies-down Stop Jellyfin"
@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 " bootstrap-mam Add MyAnonamouse to Prowlarr (needs mamId: make bootstrap-mam MAM_ID=...)"
@echo " wire-mam Point LazyLibrarian Torznab at Prowlarr MAM indexer"
@echo " bootstrap-bjshare Add BJ-Share to Prowlarr (make bootstrap-bjshare BJSHARE_COOKIE='...')"
@echo " wire-bjshare Add Prowlarr BJ-Share as extra LazyLibrarian Torznab provider"
@echo " bootstrap-pi Pi health check (run on the Pi: status + URLs)"
@echo ""
dirs:
mkdir -p config/prowlarr config/qbittorrent config/lazylibrarian config/flaresolverr config/suwayomi
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 "LazyLibrarian (books) http://localhost:5299"
@echo "Suwayomi (manga) http://localhost:4567"
@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
scan-kavita:
@if [ -z "$(KAVITA_PASS)" ]; then \
echo "Usage: make scan-kavita KAVITA_PASS=<kavita admin password>"; \
exit 1; \
fi
@KAVITA_PASS="$(KAVITA_PASS)" bash scripts/kavita-scan.sh $(if $(FORCE),--force,)
verify:
@bash scripts/verify-phase1.sh
movies-up:
mkdir -p config/jellyfin data/cache/jellyfin data/media/movies data/torrents/movies
$(COMPOSE) --profile movies up -d --no-deps jellyfin
movies-down:
$(COMPOSE) --profile movies stop jellyfin
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
bootstrap-mam:
@if [ -z "$(MAM_ID)" ]; then \
echo "Usage: make bootstrap-mam MAM_ID=<mamId cookie from myanonamouse.net>"; \
exit 1; \
fi
@bash scripts/add-mam-indexer.sh "$(MAM_ID)"
wire-mam:
@bash scripts/wire-lazylibrarian-mam.sh
bootstrap-bjshare:
@if [ -z "$$BJSHARE_COOKIE" ]; then \
echo "Usage: make bootstrap-bjshare BJSHARE_COOKIE='<cookie from bj-share.info>'"; \
exit 1; \
fi
@bash scripts/add-bjshare-indexer.sh
wire-bjshare:
@bash scripts/wire-lazylibrarian-bjshare.sh
bootstrap-pi:
@bash scripts/bootstrap-pi.sh status