diff --git a/Makefile b/Makefile index 8bc1dc6..b9ae067 100644 --- a/Makefile +++ b/Makefile @@ -4,18 +4,15 @@ # Git wird nur lokal auf dem Mac und für Forgejo-Backup genutzt. # ============================================================== -DS_HOST := ds -DS_IP := 10.47.11.10 +DS_HOST := ds +DS_IP := 10.47.11.10 # Hinweis: NPM braucht 10.47.11.99 als Forward-IP (Macvlan-Shim), nicht .10 -DS_SSH_PORT := 4711 -DS_PATH := /volume1/docker/banyaro -DS_PATH_STAGING := /volume1/docker/banyaro-staging -CONTAINER := banyaro -CONTAINER_STAGING:= banyaro-staging -SERVICE := banyaro -GIT_REMOTE := origin -DOCKER := sudo /usr/local/bin/docker -VERSION ?= $(shell grep '"version"' backend/static/manifest.json | grep -o '[0-9]*\.[0-9]*\.[0-9]*' | head -1) +DS_SSH_PORT := 4711 +DS_PATH := /volume1/docker/banyaro +CONTAINER := banyaro # container_name (für docker logs/exec) +SERVICE := banyaro # service-name in docker-compose.yml (für docker compose restart) +GIT_REMOTE := origin +DOCKER := sudo /usr/local/bin/docker # tar: was NICHT auf die DS übertragen wird TAR_EXCLUDE := --exclude='.git' \ @@ -26,7 +23,7 @@ TAR_EXCLUDE := --exclude='.git' \ --exclude='./*.db' \ --exclude='./.DS_Store' -.PHONY: help deploy deploy-clean staging release sync push restart build stop status \ +.PHONY: help deploy deploy-clean sync push restart build stop status \ logs logs-f shell db dev clean-cache check-ssh # ---------------------------------------------------------- @@ -109,47 +106,6 @@ deploy-clean: check-ssh @echo " ✓ Deploy fertig. Letzte Logs:" @ssh $(DS_HOST) "$(DOCKER) logs $(CONTAINER) --tail=15" -# ---------------------------------------------------------- -# STAGING — develop-Branch auf Staging deployen (Port 3012) -# ---------------------------------------------------------- -staging: check-ssh - @echo "→ Git push develop..." - @git push $(GIT_REMOTE) develop - @echo "→ Sync zu DS (Staging)..." - @COPYFILE_DISABLE=1 tar czf - $(TAR_EXCLUDE) . | ssh $(DS_HOST) "tar xzf - -C $(DS_PATH_STAGING)/" - @echo "→ Staging rebuild + restart..." - @ssh $(DS_HOST) " \ - cd $(DS_PATH_STAGING) && \ - $(DOCKER) compose -f docker-compose.staging.yml down && \ - $(DOCKER) compose -f docker-compose.staging.yml build && \ - $(DOCKER) compose -f docker-compose.staging.yml up -d" - @echo "" - @echo " ✓ Staging fertig — https://staging.banyaro.app" - @ssh $(DS_HOST) "$(DOCKER) logs $(CONTAINER_STAGING) --tail=10" - -# ---------------------------------------------------------- -# RELEASE — develop → main → Production (VERSION= pflichtangabe) -# Beispiel: make release VERSION=1.1.0 -# ---------------------------------------------------------- -release: check-ssh - @if [ -z "$(VERSION)" ]; then \ - echo "❌ Bitte VERSION setzen: make release VERSION=1.1.0"; exit 1; fi - @echo "→ Merge develop → main (v$(VERSION))..." - @git checkout main - @git merge develop --no-ff -m "Release v$(VERSION)" - @sed -i '' 's/"version": "[^"]*"/"version": "$(VERSION)"/' backend/static/manifest.json - @git add backend/static/manifest.json - @git commit --amend --no-edit - @git tag "v$(VERSION)" - @git push $(GIT_REMOTE) main --tags - @echo "→ Production deployen..." - @$(MAKE) deploy - @git checkout develop - @git merge main - @git push $(GIT_REMOTE) develop - @echo "" - @echo " ✓ Release v$(VERSION) veröffentlicht 🚀" - # ---------------------------------------------------------- # SYNC — nur Dateien zur DS übertragen, kein Docker-Rebuild # ACHTUNG: ALLE Dateien (CSS/JS/HTML/Python) sind ins Image gebacken! diff --git a/backend/static/index.html b/backend/static/index.html index 82258db..3f4acbb 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -94,15 +94,6 @@ - - -