simplified module loading
This commit is contained in:
parent
7e4afb11b1
commit
0bdd5fa243
3 changed files with 25 additions and 30 deletions
24
swarm.mk
Normal file
24
swarm.mk
Normal file
|
@ -0,0 +1,24 @@
|
|||
MANDATORY-swarm = DEPLOY_HOSTS DEPLOY_TYPE TAG
|
||||
|
||||
pull-swarm:
|
||||
|
||||
start-swarm:
|
||||
@- echo "\n### starting service(s)"
|
||||
@- $(foreach host,$(DEPLOY_HOSTS), \
|
||||
echo "$(host)"; \
|
||||
ssh $(SSH_USER)@$(host) "cd $(DEPLOY_PATH)/$(DEPLOY_NAME); docker stack deploy -c stack.yml $(DEPLOY_NAME)"; \
|
||||
)
|
||||
|
||||
stop-swarm:
|
||||
@- echo "\n### stopping service(s)"
|
||||
@- $(foreach host,$(DEPLOY_HOSTS), \
|
||||
echo "$(host)"; \
|
||||
ssh $(SSH_USER)@$(host) "docker stack rm $(DEPLOY_NAME)"; \
|
||||
)
|
||||
|
||||
logs-swarm:
|
||||
@- echo "\n### logs"
|
||||
@- ssh $(SSH_USER)@$(host) "docker service logs -f $(service)"
|
||||
|
||||
restart-swarm:
|
||||
# nop
|
Loading…
Add table
Add a link
Reference in a new issue