From 1565afa3fba3251798cea80c1ee09ce3f196a630 Mon Sep 17 00:00:00 2001 From: "StarsL.cn" Date: Wed, 23 Feb 2022 03:24:42 +0800 Subject: [PATCH] add Makefile --- Makefile | 22 ++++++++++++++++++++++ flask-consul/requirements.txt | 1 + docker-build.sh => units/docker-build.sh | 0 docker-push.sh => units/docker-push.sh | 4 ++-- 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 Makefile rename docker-build.sh => units/docker-build.sh (100%) rename docker-push.sh => units/docker-push.sh (97%) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..40a4d46 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +help: + echo "Read Makefile" + +build: + cd flask-consul && docker build -t flask-consul:latest . + cd vue-consul && docker build -t nginx-consul:latest . + echo -e "\n\n自行编译的版本,注意修改docker-compose.yml中的镜像地址为本地仓库后再启动。" + echo -e "\n\nBlackbox-Manager:\nhttp://{ip}:1026" + +push: + docker login --username=starsliao@163.com registry.cn-shenzhen.aliyuncs.com + docker tag nginx-consul:latest registry.cn-shenzhen.aliyuncs.com/starsl/nginx-consul:latest + docker tag nginx-consul:latest registry.cn-shenzhen.aliyuncs.com/starsl/nginx-consul:${vf} + docker tag flask-consul:latest registry.cn-shenzhen.aliyuncs.com/starsl/flask-consul:latest + docker tag flask-consul:latest registry.cn-shenzhen.aliyuncs.com/starsl/flask-consul:${vb} + docker push registry.cn-shenzhen.aliyuncs.com/starsl/nginx-consul:latest + docker push registry.cn-shenzhen.aliyuncs.com/starsl/nginx-consul:${vf} + docker push registry.cn-shenzhen.aliyuncs.com/starsl/flask-consul:latest + docker push registry.cn-shenzhen.aliyuncs.com/starsl/flask-consul:${vb} + +update: + docker-compose pull && docker-compose up -d diff --git a/flask-consul/requirements.txt b/flask-consul/requirements.txt index edd3ab4..e4b776c 100644 --- a/flask-consul/requirements.txt +++ b/flask-consul/requirements.txt @@ -1,5 +1,6 @@ flask==2.0.2 flask-restful==0.3.9 flask-cors==3.0.10 +itsdangerous==2.0.1 Flask-HTTPAuth==4.5.0 requests==2.27.1 diff --git a/docker-build.sh b/units/docker-build.sh similarity index 100% rename from docker-build.sh rename to units/docker-build.sh diff --git a/docker-push.sh b/units/docker-push.sh similarity index 97% rename from docker-push.sh rename to units/docker-push.sh index 128084e..bd0cc37 100755 --- a/docker-push.sh +++ b/units/docker-push.sh @@ -1,6 +1,6 @@ #!/bin/bash -vf=0.3.0 -vb=0.3.0 +vf=0.3.1 +vb=0.3.1 docker login --username=starsliao@163.com registry.cn-shenzhen.aliyuncs.com docker tag nginx-consul:latest registry.cn-shenzhen.aliyuncs.com/starsl/nginx-consul:latest