23 lines
534 B
Makefile
23 lines
534 B
Makefile
|
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
|