tuitio/release.sh

23 lines
696 B
Bash

#!/bin/sh
echo "Welcome!"
version="1.1.3"
oldver="1.1.2"
echo "Pull docker image identity-server:$version from registry."
docker pull alpine-nexus:8500/identity/identity-server:$version
echo "Stop old container."
docker stop identity-server && docker rm identity-server
echo "Run new container."
docker run -d --name identity-server --restart=always --memory 500mb --memory-reservation 100mb -p 5007:80 alpine-nexus:8500/identity/identity-server:$version
# https://phoenixnap.com/kb/docker-memory-and-cpu-limit
echo "Remove old image identity-server:$oldver."
docker rmi alpine-nexus:8500/identity/identity-server:$oldver
echo "Get container logs:"
docker logs identity-server
echo "DONE!"