Compare commits
	
		
			No commits in common. "master" and "avoid_unneeded_error_messages" have entirely different histories.
		
	
	
		
			master
			...
			avoid_unne
		
	
		
					 2 changed files with 6 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -2,13 +2,15 @@
 | 
			
		|||
 | 
			
		||||
A simple Makefile based deployment system.
 | 
			
		||||
 | 
			
		||||
**make-deploy** was initially hosted at https://git.dnix.de/an/make-deploy. Since it has become heavily used at chefkoch.de for system deployments, and lots of code is committed there, we moved the repo to https://git.chefkoch.net/pub/make-deploy. A mirror still exists at https://git.dnix.de/mirror/make-deploy.
 | 
			
		||||
 | 
			
		||||
**make-deploy** is licensed under the terms of the MIT-License. See [LICENSE](LICENSE) for info.
 | 
			
		||||
 | 
			
		||||
## Installation
 | 
			
		||||
 | 
			
		||||
1. Clone **make-deploy** as a submodule into your repository:
 | 
			
		||||
 | 
			
		||||
    $ git submodule add https://git.dnix.de/dnix/make-deploy
 | 
			
		||||
    $ git submodule add https://git.chefkoch.net/pub/make-deploy
 | 
			
		||||
    
 | 
			
		||||
2. Create a symlink to the Makefile:
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										10
									
								
								compose.mk
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								compose.mk
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -6,10 +6,6 @@ ifndef DOCKER_LOGIN
 | 
			
		|||
DOCKER_LOGIN = 0
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
ifndef COMPOSE_CMD
 | 
			
		||||
COMPOSE_CMD = 'docker-compose'
 | 
			
		||||
endif
 | 
			
		||||
 | 
			
		||||
pull-compose:
 | 
			
		||||
	@echo "\n### pulling image(s)"
 | 
			
		||||
	@$(foreach host,$(DEPLOY_HOSTS), \
 | 
			
		||||
| 
						 | 
				
			
			@ -30,7 +26,7 @@ start-compose:
 | 
			
		|||
	@$(foreach host,$(DEPLOY_HOSTS), \
 | 
			
		||||
		set -e; \
 | 
			
		||||
		echo "#host: $(host)"; \
 | 
			
		||||
		ssh $(SSH_USER)@$(host) "cd $(project_dir); $(COMPOSE_CMD) up -d"; \
 | 
			
		||||
		ssh $(SSH_USER)@$(host) "cd $(project_dir); docker-compose up -d"; \
 | 
			
		||||
		sleep $(DEPLOY_START_DELAY); \
 | 
			
		||||
		set +e; \
 | 
			
		||||
	)
 | 
			
		||||
| 
						 | 
				
			
			@ -40,7 +36,7 @@ logs-compose:
 | 
			
		|||
	@$(foreach host,$(DEPLOY_HOSTS), \
 | 
			
		||||
		set -e; \
 | 
			
		||||
		echo "#host: $(host)"; \
 | 
			
		||||
		ssh $(SSH_USER)@$(host) "cd $(project_dir); $(COMPOSE_CMD) logs -f $(service)"; \
 | 
			
		||||
		ssh $(SSH_USER)@$(host) "cd $(project_dir); docker-compose logs -f $(service)"; \
 | 
			
		||||
		set +e; \
 | 
			
		||||
	)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -49,7 +45,7 @@ restart-compose:
 | 
			
		|||
	@$(foreach host,$(DEPLOY_HOSTS), \
 | 
			
		||||
		set -e; \
 | 
			
		||||
		echo "#host: $(host)"; \
 | 
			
		||||
		ssh $(SSH_USER)@$(host) "cd $(project_dir); $(COMPOSE_CMD) restart"; \
 | 
			
		||||
		ssh $(SSH_USER)@$(host) "cd $(project_dir); docker-compose restart"; \
 | 
			
		||||
		sleep $(DEPLOY_START_DELAY); \
 | 
			
		||||
		set +e; \
 | 
			
		||||
	)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue