From a177dca1f65be7b91f80074f3991e654bf976105 Mon Sep 17 00:00:00 2001 From: Andreas Neue Date: Mon, 7 Nov 2022 16:57:58 +0100 Subject: [PATCH] docker.mk: -v --- docker.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docker.mk b/docker.mk index 41d269a..5b9ede4 100644 --- a/docker.mk +++ b/docker.mk @@ -5,12 +5,14 @@ stored_ctx = 'default' # HACK create-docker-contexts: @- $(foreach host,$(DEPLOY_HOSTS), \ - docker context create $(host) --description "$(host)" --docker "host=ssh://$(SSH_USER)@$(host)"; \ + echo "$(host)"; \ + docker context create $(host) --description "$(host)" --docker "host=ssh://$(SSH_USER)@$(host)"; \ ) pull-compose: @- echo "\n### pulling image(s)" @- $(foreach ctx,$(DEPLOY_HOSTS), \ + echo "$(host)"; \ docker context use $(ctx); \ if test $(DOCKER_LOGIN) -eq 1 ; \ then \ @@ -24,6 +26,7 @@ pull-swarm: start-compose: @- echo "\n### starting service(s)" @- $(foreach ctx,$(DEPLOY_HOSTS), \ + echo "$(host)"; \ docker context use $(ctx); \ docker-compose up -d; \ ) @@ -32,6 +35,7 @@ start-compose: start-swarm: @- echo "\n### starting service(s)" @- $(foreach ctx,$(DEPLOY_HOSTS), \ + echo "$(host)"; \ docker --context $(ctx) stack deploy -c stack.yml $(DEPLOY_NAME); \ ) @- docker context use $(stored_ctx) @@ -39,6 +43,7 @@ start-swarm: stop-compose: @- echo "\n### stopping service(s)" @- $(foreach ctx,$(DEPLOY_HOSTS), \ + echo "$(host)"; \ docker context use $(ctx); \ docker-compose down; \ ) @@ -47,6 +52,7 @@ stop-compose: stop-swarm: @- echo "\n### stopping service(s)" @- $(foreach ctx,$(DEPLOY_HOSTS), \ + echo "$(host)"; \ docker --context $(ctx) stack rm $(DEPLOY_NAME); \ ) @- docker context use $(stored_ctx) @@ -65,6 +71,7 @@ logs-swarm: restart-compose: @- $(foreach ctx,$(DEPLOY_HOSTS), \ + echo "$(host)"; \ docker context use $(ctx); \ docker-compose restart; \ )