-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (20 loc) · 858 Bytes
/
Makefile
File metadata and controls
25 lines (20 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
repository=$(shell basename -s .git $(shell git config --get remote.origin.url))
user=hatlonely
version=$(shell git describe --tags)
.PHONY: image
image:
docker build --tag=hatlonely/${repository}:${version} .
cat stack.tpl.yml | sed 's/\$${version}/${version}/g' | sed 's/\$${repository}/${repository}/g' > stack.yml
.PHONY: deploy
deploy:
# docker network create --driver overlay --attachable attachable-overlay-network
# docker service update --network-rm attachable-overlay-network mysqlnet
# docker service update --network-add attachable-overlay-network mysql_mysql
# docker run -it --network=attachable-overlay-network hatlonely/${repository}:${version}
# docker stack deploy -c stack.yml ${repository}
docker run --network host hatlonely/${repository}:${version}
.PHONY: remove
remove:
docker stack rm ${repository}
dist:
npm run build