Skip to content

Instantly share code, notes, and snippets.

View MartinSchmidt123's full-sized avatar

Martin Schmidt MartinSchmidt123

View GitHub Profile
@MartinSchmidt123
MartinSchmidt123 / Makefile
Created November 5, 2017 11:14
Makefile for common commands used with a docker swarm cluster
name=$(shell basename $(CURDIR))
ls = docker stack services ${name}
rm = docker stack rm ${name}
deploy = docker stack deploy -c docker-stack.yml ${name}
build = docker-compose -f docker-compose.yml build
logs = multitail $(shell docker stack services --format "{{.Name}}" ${name} | xargs -n1 sh -c 'echo -l \"docker service logs --raw -f $${@}\"\ ' "$${0}")
ls: