diff --git a/NetworkResurrector.sln b/NetworkResurrector.sln index 5a2dc68..3e5c69c 100644 --- a/NetworkResurrector.sln +++ b/NetworkResurrector.sln @@ -47,6 +47,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "api", "api", "{C5096F61-731 ProjectSection(SolutionItems) = preProject build-amd64.sh = build-amd64.sh build-arm32v7.sh = build-arm32v7.sh + release.sh = release.sh EndProjectSection EndProject Global diff --git a/build-amd64.sh b/build-amd64.sh index a2070aa..b5afb29 100644 --- a/build-amd64.sh +++ b/build-amd64.sh @@ -1,7 +1,7 @@ #!/bin/bash echo "Welcome!" -version="1.0.1" +version="1.0.2" localRegistryPass="***REMOVED***" echo "Create docker image with version $version." diff --git a/release.sh b/release.sh new file mode 100644 index 0000000..0111c26 --- /dev/null +++ b/release.sh @@ -0,0 +1,22 @@ +#!/bin/sh +echo "Welcome!" + +version="1.0.2" +oldver="1.0.1" + +echo "Pull docker image network-resurrector-api:$version from registry." +docker pull alpine-nexus:8500/network-resurrector/network-resurrector-api:$version + +echo "Stop old container." +docker stop network-resurrector-api && docker rm network-resurrector-api + +echo "Run new container." +docker run -d --name network-resurrector-api --restart=always -p 5008:80 alpine-nexus:8500/network-resurrector/network-resurrector-api:$version + +echo "Remove old image network-resurrector-api:$oldver." +docker rmi alpine-nexus:8500/network-resurrector/network-resurrector-api:$oldver + +echo "Get container logs:" +docker logs network-resurrector-api + +echo "DONE!" \ No newline at end of file