Improved update.sh

This commit is contained in:
Marc Baloup 2022-12-07 16:37:07 +01:00
parent 1fb1a6bf5b
commit c133327bfe
Signed by: marcbal
GPG Key ID: BBC0FE3ABC30B893

View File

@ -2,11 +2,19 @@
cd "${0%/*}" || exit
mkdir -p workdir
echo "Creating workdir..."
mkdir -p workdir || exit
# needs the presence of a docker-compose.yml file (use the provided example)
docker compose down && \
git pull && \
mvn clean package && \
docker compose up -d
echo "Stopping service..."
docker compose down || exit
echo "Pulling new version..."
git pull || exit
echo "Compiling new version..."
mvn clean package || exit
echo "Starting service"
docker compose up -d || exit