add possibility to add a subpath if docker-compose stuff is not in repo root
This commit is contained in:
		
							parent
							
								
									99f4568e7e
								
							
						
					
					
						commit
						b299948bf8
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -25,7 +25,7 @@ start-compose:
 | 
			
		|||
	@- echo "\n### starting service(s)"
 | 
			
		||||
	@- $(foreach host,$(DEPLOY_HOSTS), \
 | 
			
		||||
		echo "$(host)"; \
 | 
			
		||||
		ssh $(SSH_USER)@$(host) "cd $(DEPLOY_PATH)/$(DEPLOY_NAME); docker-compose up -d"; \
 | 
			
		||||
		ssh $(SSH_USER)@$(host) "cd $(DEPLOY_PATH)/$(DEPLOY_NAME)$(if$(DEPLOY_SUBPATH),/$(DEPLOY_SUBPATH),); docker-compose up -d"; \
 | 
			
		||||
		sleep $(DEPLOY_START_DELAY); \
 | 
			
		||||
	)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -33,16 +33,16 @@ stop-compose:
 | 
			
		|||
	@- echo "\n### stopping service(s)"
 | 
			
		||||
	@- $(foreach host,$(DEPLOY_HOSTS), \
 | 
			
		||||
		echo "$(host)"; \
 | 
			
		||||
		ssh $(SSH_USER)@$(host) "cd $(DEPLOY_PATH)/$(DEPLOY_NAME); docker-compose down"; \
 | 
			
		||||
		ssh $(SSH_USER)@$(host) "cd $(DEPLOY_PATH)/$(DEPLOY_NAME)$(if$(DEPLOY_SUBPATH),/$(DEPLOY_SUBPATH),); docker-compose down"; \
 | 
			
		||||
	)
 | 
			
		||||
		
 | 
			
		||||
logs-compose:
 | 
			
		||||
	@- echo "\n### logs"
 | 
			
		||||
	@- ssh $(SSH_USER)@$(host) "cd $(DEPLOY_PATH)/$(DEPLOY_NAME); docker-compose logs -f $(service)"
 | 
			
		||||
	@- ssh $(SSH_USER)@$(host) "cd $(DEPLOY_PATH)/$(DEPLOY_NAME)$(if$(DEPLOY_SUBPATH),/$(DEPLOY_SUBPATH),); docker-compose logs -f $(service)"
 | 
			
		||||
	
 | 
			
		||||
restart-compose:
 | 
			
		||||
	@- $(foreach host,$(DEPLOY_HOSTS), \
 | 
			
		||||
		echo "$(host)"; \
 | 
			
		||||
		ssh $(SSH_USER)@$(host) "cd $(DEPLOY_PATH)/$(DEPLOY_NAME); docker-compose restart"; \
 | 
			
		||||
		ssh $(SSH_USER)@$(host) "cd $(DEPLOY_PATH)/$(DEPLOY_NAME)$(if$(DEPLOY_SUBPATH),/$(DEPLOY_SUBPATH),); docker-compose restart"; \
 | 
			
		||||
		sleep $(DEPLOY_START_DELAY); \
 | 
			
		||||
	)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue