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