diff --git a/Makefile b/Makefile index 6a18df4..476f707 100644 --- a/Makefile +++ b/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" \ No newline at end of file