-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (38 loc) · 1.44 KB
/
Copy pathMakefile
File metadata and controls
51 lines (38 loc) · 1.44 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
.PHONY: build run dev stop logs shell lint test init
# ---- Docker --------------------------------------------------------------- #
build:
docker compose build
run:
docker compose up -d
# Dev local (Mac) : charge automatiquement docker compose.override.yml
dev:
docker compose up
stop:
docker compose down
logs:
docker compose logs -f
shell:
docker compose exec frigate-gdrive-sync bash
# ---- First-time setup ----------------------------------------------------- #
init:
@if [ ! -f config/config.yaml ]; then \
cp config/config.example.yaml config/config.yaml; \
echo "✓ Created config/config.yaml – edit frigate.host_fallback and mqtt.host_fallback"; \
else \
echo "config/config.yaml already exists, skipping."; \
fi
@if [ ! -f config/rclone.conf ]; then \
echo "⚠ config/rclone.conf not found."; \
echo " Copy your existing rclone.conf to ./config/rclone.conf"; \
fi
@if [ ! -f docker compose.override.yml ]; then \
cp docker compose.override.yml.example docker compose.override.yml; \
echo "✓ Created docker compose.override.yml – edit the IPs before running 'make dev'"; \
fi
# ---- Dev helpers ---------------------------------------------------------- #
lint:
ruff check src/ && mypy src/ --ignore-missing-imports
test:
./scripts/test.sh
clean-db:
docker compose exec frigate-gdrive-sync sqlite3 /data/events.db "DELETE FROM events WHERE status IN ('done','failed'); SELECT changes() || ' events deleted';"