This commit is contained in:
team3
2026-08-31 11:54:20 +02:00
parent f29a4106bb
commit e7216138c7
21 changed files with 1517 additions and 87 deletions

View File

@@ -1,15 +1,30 @@
.PHONY: install dev stop sync build prod logs down push pull
.PHONY: install dev stop sync build prod logs down push pull stream stream-stop mtx mtx-stop
install:
cd backend && python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
cd frontend && npm install
dev:
# MediaMTX nimmt den Stream entgegen. Ohne ihn läuft der Stream-Reiter ins
# Leere und OBS findet keinen Server.
mtx:
@docker ps --filter name=horror-mtx-dev --format '{{.Names}}' | grep -q . || \
docker run -d --name horror-mtx-dev --network host \
--env-file .env \
-e MTX_AUTHINTERNALUSERS_0_PASS="$$(grep '^MTX_SENDEPASSWORT=' .env | cut -d= -f2-)" \
-v "$(PWD)/mediamtx/mediamtx.yml:/mediamtx.yml:ro" \
bluenviron/mediamtx:latest > /dev/null
@echo "MediaMTX läuft: RTMP auf :1935, HLS auf :8890"
mtx-stop:
-@docker rm -f horror-mtx-dev 2>/dev/null > /dev/null
@echo "MediaMTX gestoppt."
dev: mtx
@echo "Backend: http://localhost:8000 Frontend: http://localhost:5173"
@cd backend && .venv/bin/uvicorn app.main:app --reload --port 8000 &
@cd frontend && npx vite --port 5173
stop:
stop: mtx-stop stream-stop
-@pkill -f "uvicorn app.main:app" 2>/dev/null
-@pkill -f "vite --port 5173" 2>/dev/null
@echo "gestoppt."
@@ -32,6 +47,18 @@ logs:
down:
docker compose down
# ── Senden ───────────────────────────────────────────────────────────────────
# Ohne Argument an den lokalen MediaMTX, sonst an den Server:
# make stream ZIEL=horror.marha.de
ZIEL ?= 127.0.0.1
stream: mtx
@scripts/stream.sh $(ZIEL)
stream-stop:
-@pkill -f "obs --profile filmabend" 2>/dev/null
@echo "OBS beendet."
# ── Datenbank hin und her (lokal ausführen) ───────────────────────────────────
SERVER = root@178.104.67.87
REMOTE = /var/www/horror