feat: add 2 distinct deploy targets to avoid the other stack restart

This commit is contained in:
Alexis Fourmaux 2026-05-08 12:39:48 +02:00
parent bdfe1a5f00
commit b6d8d904a9

View file

@ -6,11 +6,20 @@ RSYNC_OPTS = -arvz --delete --exclude='__pycache__' --exclude='*.pyc' --exclude=
.PHONY: deploy
deploy:
deploy-all: deploy-gw deploy-app
deploy-app:
@echo "Déploiement sur $(REMOTE):$(DEST)"
ssh $(REMOTE) "mkdir -p $(DEST)"
rsync $(RSYNC_OPTS) . $(REMOTE):$(DEST)
rsync $(RSYNC_OPTS) ./app $(REMOTE):$(DEST)/app
@echo "Déploiement terminé"
ssh $(REMOTE) "cd $(DEST)/app && docker compose up -d --force-recreate --build"
@echo "Services redémarrés"
deploy-gw:
@echo "Déploiement sur $(REMOTE):$(DEST)"
ssh $(REMOTE) "mkdir -p $(DEST)"
rsync $(RSYNC_OPTS) ./lora-gateway $(REMOTE):$(DEST)/lora-gateway
@echo "Déploiement terminé"
ssh $(REMOTE) "cd $(DEST)/lora-gateway && docker compose up -d --force-recreate"
ssh $(REMOTE) "cd $(DEST)/app && docker compose up -d --force-recreate"
@echo "Services redémarrés"