TICLinky/update.sh

20 lines
379 B
Bash
Raw Normal View History

2022-12-07 14:22:06 +01:00
#!/bin/sh
cd "${0%/*}" || exit
2022-12-07 16:37:07 +01:00
echo "Creating workdir..."
mkdir -p workdir || exit
2022-12-07 14:22:06 +01:00
# needs the presence of a docker-compose.yml file (use the provided example)
2022-12-07 16:37:07 +01:00
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