Last active
September 21, 2018 09:53
-
-
Save pyldin601/9de8b6598e919633b57a4c5be4fecf05 to your computer and use it in GitHub Desktop.
Generic Makefile for docker swarm service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IMAGE_NAME := superorder/superorder-datafeed | |
CONTAINER_NAME := superorder-datafeed | |
SERVICE_NAME := superorder_datafeed | |
TAG := latest | |
docker-build: | |
docker build -t $(IMAGE_NAME):$(TAG) . | |
docker-start: | |
docker run -it --name $(CONTAINER_NAME) --rm $(IMAGE_NAME):$(TAG) | |
docker-push: | |
docker push $(IMAGE_NAME):$(TAG) | |
deploy: | |
ssh $(DEPLOY_HOST) -- docker service update --force --with-registry-auth --image=$(IMAGE_NAME):$(TAG) $(SERVICE_NAME) | |
.PHONY: deploy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment