Used fetch_and_deploy_gh_release instead of manualy using git
This commit is contained in:
parent
9c3c5e02ae
commit
684ce5a218
@ -14,28 +14,23 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
get_latest_release() {
|
|
||||||
curl -fsSL https://api.github.com/repos/"$1"/releases/latest | grep '"tag_name":' | cut -d'"' -f4
|
|
||||||
}
|
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt install -y \
|
$STD apt install -y \
|
||||||
npm \
|
npm \
|
||||||
golang
|
golang
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
DOCKER_LATEST_VERSION=$(get_latest_release "moby/moby")
|
msg_info "Installing Docker"
|
||||||
msg_info "Installing Docker $DOCKER_LATEST_VERSION"
|
|
||||||
DOCKER_CONFIG_PATH='/etc/docker/daemon.json'
|
DOCKER_CONFIG_PATH='/etc/docker/daemon.json'
|
||||||
mkdir -p $(dirname $DOCKER_CONFIG_PATH)
|
mkdir -p $(dirname $DOCKER_CONFIG_PATH)
|
||||||
echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json
|
echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json
|
||||||
$STD sh <(curl -fsSL https://get.docker.com)
|
$STD sh <(curl -fsSL https://get.docker.com)
|
||||||
msg_ok "Installed Docker $DOCKER_LATEST_VERSION"
|
msg_ok "Installed Docker"
|
||||||
|
|
||||||
DISCOPANEL_LATEST_VERSION=$(get_latest_release "nickheyer/discopanel")
|
|
||||||
msg_info "Installing DiscoPanel ${DISCOPANEL_LATEST_VERSION}"
|
msg_info "Installing DiscoPanel"
|
||||||
git clone https://github.com/nickheyer/discopanel.git /opt/"${APPLICATION}"
|
fetch_and_deploy_gh_release "discopanel" "nickheyer/discopanel" "tarball" "latest" "/opt/discopanel"
|
||||||
msg_ok "Installed DiscoPanel ${DISCOPANEL_LATEST_VERSION}"
|
msg_ok "Installed DiscoPanel"
|
||||||
|
|
||||||
msg_info "Building DiscoPanel frontend Application"
|
msg_info "Building DiscoPanel frontend Application"
|
||||||
cd /opt/"${APPLICATION}"/web/discopanel || exit
|
cd /opt/"${APPLICATION}"/web/discopanel || exit
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user