From 31d9a5b61c19955c8ab3f86f6b5c98474d6791df Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Sun, 1 Aug 2021 03:04:48 +0300 Subject: [PATCH] release.sh --- notes/docker.txt | 10 ++++++++-- release.sh | 22 ++++++++++++++++++++++ src/pages/login/Login.js | 2 +- 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 release.sh diff --git a/notes/docker.txt b/notes/docker.txt index 1f19810..26bf2f9 100644 --- a/notes/docker.txt +++ b/notes/docker.txt @@ -25,11 +25,17 @@ Pull image from registry --pull image docker pull alpine-nexus:8500/cdn/cdn-admin-frontend:1.0.0 +Stop old container +docker stop cdn-admin-frontend && docker rm cdn-admin-frontend + Run container in prod env docker run -d --name cdn-admin-frontend --restart=always -p 5010:80 alpine-nexus:8500/cdn/cdn-admin-frontend:1.0.0 -Rename container -docker rename cdn-admin-frontend +Remove old image +docker rmi alpine-nexus:8500/cdn/cdn-admin-frontend:1.0.0 + +Get container logs +docker logs cdn-admin-frontend ####################################################################################################################################################### Docker container last version: 1.0.0 diff --git a/release.sh b/release.sh new file mode 100644 index 0000000..c581378 --- /dev/null +++ b/release.sh @@ -0,0 +1,22 @@ +#!/bin/bash +echo "Welcome!" + +version="1.0.1" +oldver="1.0.0" + +echo "Pull docker image cdn-admin-frontend:$version from registry." +docker pull alpine-nexus:8500/cdn/cdn-admin-frontend:$version + +echo "Stop old container." +docker stop cdn-admin-frontend && docker rm cdn-admin-frontend + +echo "Run new container." +docker run -d --name cdn-admin-frontend --restart=always -p 5010:80 alpine-nexus:8500/cdn/cdn-admin-frontend:$version + +echo "Remove old image cdn-admin-frontend:$oldver." +docker rmi alpine-nexus:8500/cdn/cdn-admin-frontend:$oldver + +echo "Get container logs:" +docker logs cdn-admin-frontend + +echo "DONE!" \ No newline at end of file diff --git a/src/pages/login/Login.js b/src/pages/login/Login.js index 532c1d1..d300c41 100644 --- a/src/pages/login/Login.js +++ b/src/pages/login/Login.js @@ -34,7 +34,7 @@ function Login(props) { var [activeTabId, setActiveTabId] = useState(0); var [nameValue, setNameValue] = useState(""); var [loginValue, setLoginValue] = useState(***REMOVED***); - var [passwordValue, setPasswordValue] = useState("***REMOVED***"); + var [passwordValue, setPasswordValue] = useState(""); return (