diff --git a/Makefile b/Makefile index fafcda8..dd990ce 100644 --- a/Makefile +++ b/Makefile @@ -27,15 +27,13 @@ post-deploy-swarm: post-deploy-docker pre-deploy-docker: @- echo "\n### running pre-deploy script" @- $(foreach host,$(DEPLOY_HOSTS), \ - cd $(DEPLOY_PATH)/$(DEPLOY_NAME); \ - sh pre-deploy; \ + ssh $(SSH_USER)@$(host) "cd $(DEPLOY_PATH)/$(DEPLOY_NAME); sh pre-deploy"; \ ) post-deploy-docker: @- echo "\n### running post-deploy script" @- $(foreach host,$(DEPLOY_HOSTS), \ - cd $(DEPLOY_PATH)/$(DEPLOY_NAME); \ - sh post-deploy; \ + ssh $(SSH_USER)@$(host) "cd $(DEPLOY_PATH)/$(DEPLOY_NAME); sh post-deploy"; \ ) upload: