Improved update.sh
This commit is contained in:
parent
1fb1a6bf5b
commit
c133327bfe
18
update.sh
18
update.sh
@ -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
|
Loading…
Reference in New Issue
Block a user