feat: add 2 distinct deploy targets to avoid the other stack restart
This commit is contained in:
parent
bdfe1a5f00
commit
b6d8d904a9
1 changed files with 12 additions and 3 deletions
15
Makefile
15
Makefile
|
|
@ -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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue