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.
|
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.
|
**make-deploy** is licensed under the terms of the MIT-License. See [LICENSE](LICENSE) for info.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
1. Clone **make-deploy** as a submodule into your repository:
|
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:
|
2. Create a symlink to the Makefile:
|
||||||
|
|
||||||
|
|
|
||||||
10
compose.mk
10
compose.mk
|
|
@ -6,10 +6,6 @@ ifndef DOCKER_LOGIN
|
||||||
DOCKER_LOGIN = 0
|
DOCKER_LOGIN = 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef COMPOSE_CMD
|
|
||||||
COMPOSE_CMD = 'docker-compose'
|
|
||||||
endif
|
|
||||||
|
|
||||||
pull-compose:
|
pull-compose:
|
||||||
@echo "\n### pulling image(s)"
|
@echo "\n### pulling image(s)"
|
||||||
@$(foreach host,$(DEPLOY_HOSTS), \
|
@$(foreach host,$(DEPLOY_HOSTS), \
|
||||||
|
|
@ -30,7 +26,7 @@ start-compose:
|
||||||
@$(foreach host,$(DEPLOY_HOSTS), \
|
@$(foreach host,$(DEPLOY_HOSTS), \
|
||||||
set -e; \
|
set -e; \
|
||||||
echo "#host: $(host)"; \
|
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); \
|
sleep $(DEPLOY_START_DELAY); \
|
||||||
set +e; \
|
set +e; \
|
||||||
)
|
)
|
||||||
|
|
@ -40,7 +36,7 @@ logs-compose:
|
||||||
@$(foreach host,$(DEPLOY_HOSTS), \
|
@$(foreach host,$(DEPLOY_HOSTS), \
|
||||||
set -e; \
|
set -e; \
|
||||||
echo "#host: $(host)"; \
|
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; \
|
set +e; \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -49,7 +45,7 @@ restart-compose:
|
||||||
@$(foreach host,$(DEPLOY_HOSTS), \
|
@$(foreach host,$(DEPLOY_HOSTS), \
|
||||||
set -e; \
|
set -e; \
|
||||||
echo "#host: $(host)"; \
|
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); \
|
sleep $(DEPLOY_START_DELAY); \
|
||||||
set +e; \
|
set +e; \
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue