Self-hostable uptime monitor and status page on Django: HTTP checks, Lighthouse audits, SEO crawls, and email and Discord alerts.
djangodockerhandcodedpythonself-hostedsqlitestatus-pageuptime-monitoringvite
1# Django + Vite Makefile
2
3
4.PHONY: run runserver vite clean push pull update scheduler
5.DEFAULT: run
6
7
8SERVER_URL = $(shell git config --get remote.server.url | cut -d ':' -f 1)
9PROJECT_NAME = $(shell basename $(PWD))
10
11
12run: install
13 @echo "run ----------------------------------------------------------------"
14 ${MAKE} -j2 runserver vite
15
16runserver:
17 uv run python manage.py runserver 0.0.0.0:8000
18
19vite:
20 bun run dev
21
22scheduler:
23 uv run python manage.py scheduler
24
25
26install: node_modules/touchfile .venv/touchfile db.sqlite3
27
28node_modules/touchfile: package.json
29 @echo "install node deps --------------------------------------------------"
30 bun install
31 touch $@
32 @echo "> all node deps installed"
33
34.venv/touchfile: pyproject.toml
35 @echo "install python deps ------------------------------------------------"
36 uv sync
37 touch $@
38 @echo "> all python deps installed"
39
40db.sqlite3:
41 @echo "create database ----------------------------------------------------"
42 uv run python manage.py migrate
43 @echo "> database created"
44
45
46push:
47 @echo "push ---------------------------------------------------------------"
48 git remote | xargs -I R git push R master
49
50pull:
51 @echo "pull ---------------------------------------------------------------"
52 rsync -avz $(SERVER_URL):/srv/data/$(PROJECT_NAME)/db/db.sqlite3 db.sqlite3
53 rsync -avz $(SERVER_URL):/srv/data/$(PROJECT_NAME)/media/ media
54 @echo "> all files copied"
55
56
57update: install
58 @echo "update -------------------------------------------------------------"
59 uv lock --upgrade
60 bun update --latest
61 @echo "> all deps updated"
62
63
64clean:
65 @echo "clean --------------------------------------------------------------"
66 rm -rf node_modules
67 rm -rf .venv
68 rm -rf db.sqlite3
69 rm -rf media
70 @echo "> all files removed"