deploy scripts QoL changes

This commit is contained in:
Jörn-Michael Miehe 2023-11-16 15:32:02 +01:00
parent afbd9f4db8
commit 30566fe449
2 changed files with 12 additions and 10 deletions

View file

@ -6,13 +6,12 @@ script_dir="$( dirname "${script}" )"
# shellcheck disable=SC1091 # shellcheck disable=SC1091
. "${script_dir}/check_version" . "${script_dir}/check_version"
install_version="$( \ # defined in `check_version` script
grep '^ovd_version' "${script_dir}/../install.sh" \ # shellcheck disable=SC2154
| sed -E 's/^ovd_version[^0-9]*((0|[1-9][0-9]*)[0-9\.]*[0-9]).*$/\1/' echo "${git_version}" >/dev/null
)"
docker buildx build \ docker buildx build \
--pull --push \ --pull --push \
--tag "code.yavook.de/oekzident.de/ovdashboard:${install_version}" \ --tag "code.yavook.de/oekzident.de/ovdashboard:${git_version}" \
--platform "linux/amd64,linux/arm64" \ --platform "linux/amd64,linux/arm64" \
"${script_dir}/../.." "${script_dir}/../.."

View file

@ -67,20 +67,23 @@ echo '{"intl":{"selected_languages":"'"${display_lang}"'"}}' \
mkdir -p /opt/ovdashboard mkdir -p /opt/ovdashboard
# compose file # prepare compose project
curl \ curl \
--proto "=https" --tlsv1.2 -sSf \ --proto "=https" --tlsv1.2 -sSf \
--output "/opt/ovdashboard/docker-compose.yml" \ --output "/opt/ovdashboard/docker-compose.yml" \
"https://code.yavook.de/OEKZident.de/ovdashboard/raw/tag/v${ovd_version}/deploy/docker-compose.yml" "https://code.yavook.de/OEKZident.de/ovdashboard/raw/tag/v${ovd_version}/deploy/docker-compose.yml"
echo "Please review the Docker Compose file before continuing! [press Enter]" docker compose \
read -r _ENTER --project-directory "/opt/ovdashboard" \
pull
# review compose file
echo "Please review the Docker Compose file before continuing! [hit Return]"
read -r _RETURN
nano "/opt/ovdashboard/docker-compose.yml" nano "/opt/ovdashboard/docker-compose.yml"
# start server # start server
docker compose \ docker compose \
--file "/opt/ovdashboard/docker-compose.yml" \
--project-directory "/opt/ovdashboard" \ --project-directory "/opt/ovdashboard" \
--project-name "ovdashboard" \
up --detach up --detach
############ ############