From 30566fe449cc431175d1701df8923d9163032e2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= <40151420+ldericher@users.noreply.github.com> Date: Thu, 16 Nov 2023 15:32:02 +0100 Subject: [PATCH] deploy scripts QoL changes --- deploy/chores/docker_buildx | 9 ++++----- deploy/install.sh | 13 ++++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/deploy/chores/docker_buildx b/deploy/chores/docker_buildx index c4ff9a0..2f37620 100755 --- a/deploy/chores/docker_buildx +++ b/deploy/chores/docker_buildx @@ -6,13 +6,12 @@ script_dir="$( dirname "${script}" )" # shellcheck disable=SC1091 . "${script_dir}/check_version" -install_version="$( \ - grep '^ovd_version' "${script_dir}/../install.sh" \ - | sed -E 's/^ovd_version[^0-9]*((0|[1-9][0-9]*)[0-9\.]*[0-9]).*$/\1/' -)" +# defined in `check_version` script +# shellcheck disable=SC2154 +echo "${git_version}" >/dev/null docker buildx build \ --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" \ "${script_dir}/../.." diff --git a/deploy/install.sh b/deploy/install.sh index 95c2f63..0d5531b 100644 --- a/deploy/install.sh +++ b/deploy/install.sh @@ -67,20 +67,23 @@ echo '{"intl":{"selected_languages":"'"${display_lang}"'"}}' \ mkdir -p /opt/ovdashboard -# compose file +# prepare compose project curl \ --proto "=https" --tlsv1.2 -sSf \ --output "/opt/ovdashboard/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]" -read -r _ENTER +docker compose \ + --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" # start server docker compose \ - --file "/opt/ovdashboard/docker-compose.yml" \ --project-directory "/opt/ovdashboard" \ - --project-name "ovdashboard" \ up --detach ############