Skip to content

Commit

Permalink
feat(release): Add deploy rule
Browse files Browse the repository at this point in the history
  • Loading branch information
gfanton committed Nov 21, 2018
1 parent 8a28bf8 commit dc9f675
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
IMAGE ?= bertychat/yolo
HOST ?= [email protected]
HOSTNAME ?= yolo.berty.io
CIRCLE_TOKEN ?= ***REMOVED***

.PHONY: install
install:
GOPROXY=http://goproxy.berty.io:3000/ GO111MODULE=on go install -v ./cmd/...

.PHONY: docker.build
docker.build:
docker build -t bertychat/yolo .
docker build -t "$(IMAGE)" .

.PHONY: docker.push

docker.push: docker.build
docker push bertychat/yolo
docker push "$(IMAGE)"

.PHONY: deploy
deploy:
ssh "$(HOST)" docker pull "$(IMAGE)" \
&& (docker rm -f yolo || true) \
&& docker run --name yolo -d -p 80:3670 bertychat/yolo \
-t "$(CIRCLE_TOKEN)" serve \
--hostname "$(HOSTNAME)" -p 'xor+=cool'

.PHONY: release
release: docker.build docker.push deploy

0 comments on commit dc9f675

Please sign in to comment.