swarm stuff
This commit is contained in:
parent
64f447bbe9
commit
b0cb40c08f
17
Makefile
17
Makefile
|
@ -42,13 +42,17 @@ upload:
|
|||
rsync -rav --exclude '*~' --exclude '.git*' . $(SSH_USER)@$(host):$(DEPLOY_PATH)/$(DEPLOY_NAME); \
|
||||
)
|
||||
|
||||
pull:
|
||||
pull: pull-$(DEPLOY_TYPE)
|
||||
|
||||
pull-compose:
|
||||
@- echo "\n### pulling image(s)"
|
||||
@- $(foreach ctx,$(DEPLOY_HOSTS), \
|
||||
docker context use $(ctx); \
|
||||
docker pull $(DOCKER_IMAGE); \
|
||||
)
|
||||
|
||||
pull-swarm:
|
||||
|
||||
start: start-$(DEPLOY_TYPE)
|
||||
|
||||
start-compose:
|
||||
|
@ -59,6 +63,10 @@ start-compose:
|
|||
)
|
||||
|
||||
start-swarm:
|
||||
@- echo "\n### starting service(s)"
|
||||
@- $(foreach ctx,$(DEPLOY_HOSTS), \
|
||||
docker stack deploy -c $(DEPLOY_PATH)/$(DEPLOY_NAME)/stack.yml $(DEPLOY_NAME); \
|
||||
)
|
||||
|
||||
stop: stop-$(DEPLOY_TYPE)
|
||||
|
||||
|
@ -70,6 +78,10 @@ stop-compose:
|
|||
)
|
||||
|
||||
stop-swarm:
|
||||
@- echo "\n### stopping service(s)"
|
||||
@- $(foreach ctx,$(DEPLOY_HOSTS), \
|
||||
docker stack rm $(DEPLOY_NAME); \
|
||||
)
|
||||
|
||||
logs: logs-$(DEPLOY_TYPE)
|
||||
|
||||
|
@ -78,8 +90,9 @@ logs-compose:
|
|||
@- docker context use $(host)
|
||||
@- docker-compose logs -f $(service)
|
||||
|
||||
|
||||
logs-swarm:
|
||||
@- echo "\n### logs"
|
||||
@- docker service logs -f $(service)
|
||||
|
||||
restart: restart-$(DEPLOY_TYPE)
|
||||
|
||||
|
|
Loading…
Reference in New Issue