Makefile 699 B

1234567891011121314151617181920212223242526
  1. NAME=datax-admin
  2. VERSION=latest
  3. BUILD_TIME := $(shell date "+%F %T")
  4. COMMIT_SHA1 := $(shell git rev-parse HEAD)
  5. AUTHOR := $(shell git show -s --format='%an')
  6. REMOTE_WORKSPACE=/home/sxwl1070/zhangli/bigdata/datax-admin
  7. USER=sxwl1070
  8. HOST=192.168.199.107
  9. .PHONY: image publish
  10. all: image publish
  11. image:
  12. @docker build -t registry.cn-hangzhou.aliyuncs.com/sxtest/$(NAME):$(VERSION) .
  13. publish:
  14. @docker push registry.cn-hangzhou.aliyuncs.com/sxtest/$(NAME):$(VERSION)
  15. pull:
  16. @docker pull registry.cn-hangzhou.aliyuncs.com/sxtest/$(NAME):$(VERSION)
  17. deploy: image
  18. @docker-compose down && docker-compose up -d
  19. remote:
  20. @ssh -t $(USER)@$(HOST) "cd $(REMOTE_WORKSPACE); make deploy"