From 9df0a2e54524ff97c972303a201827c490bdf103 Mon Sep 17 00:00:00 2001 From: Jason Hollis <400979+CodeBleu@users.noreply.github.com> Date: Thu, 7 Dec 2023 12:08:43 -0500 Subject: [PATCH 01/30] fix: Better handling of errors with install script --- scripts/install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/install.sh b/scripts/install.sh index b7afeaefb..69a7a3eb0 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -1,6 +1,10 @@ #!/bin/bash ## Do not modify this file. You will lose the ability to install and auto-update! +set -e # Exit immediately if a command exits with a non-zero status +set -u # Treat unset variables as an error and exit +set -o pipefail # Cause a pipeline to return the status of the last command that exited with a non-zero status + VERSION="1.1.0" DOCKER_VERSION="24.0" From c1f6bf41f510fb5e26db96d791317a89f9e413a1 Mon Sep 17 00:00:00 2001 From: Jason Hollis <400979+CodeBleu@users.noreply.github.com> Date: Thu, 7 Dec 2023 16:54:06 -0500 Subject: [PATCH 02/30] fix: Install script parse version * Allow version to be passed with v or V at the beginning of version. This allows users to pass along the actual github tagged version as it is listed on github. * Linting updates --- scripts/install.sh | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 69a7a3eb0..471f640ed 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -9,8 +9,8 @@ VERSION="1.1.0" DOCKER_VERSION="24.0" CDN="https://cdn.coollabs.io/coolify" -OS_TYPE=$(cat /etc/os-release | grep -w "ID" | cut -d "=" -f 2 | tr -d '"') -OS_VERSION=$(cat /etc/os-release | grep -w "VERSION_ID" | cut -d "=" -f 2 | tr -d '"') +OS_TYPE=$(grep -w "ID" /etc/os-release | cut -d "=" -f 2 | tr -d '"') +OS_VERSION=$(grep -w "VERSION_ID" /etc/os-release | cut -d "=" -f 2 | tr -d '"') LATEST_VERSION=$(curl --silent $CDN/versions.json | grep -i version | sed -n '2p' | xargs | awk '{print $2}' | tr -d ',') DATE=$(date +"%Y%m%d-%H%M%S") @@ -30,6 +30,8 @@ esac # Ovewrite LATEST_VERSION if user pass a version number if [ "$1" != "" ]; then LATEST_VERSION=$1 + LATEST_VERSION="${LATEST_VERSION,,}" + LATEST_VERSION="${LATEST_VERSION#v}" fi echo -e "-------------" @@ -83,8 +85,8 @@ fi echo -e "-------------" echo -e "Check Docker Configuration..." mkdir -p /etc/docker - -test -s /etc/docker/daemon.json && cp /etc/docker/daemon.json /etc/docker/daemon.json.original-$DATE || cat >/etc/docker/daemon.json </etc/docker/daemon.json </etc/docker/daemon.json.coolify </etc/docker/daemon.json.coolify -cat <<<$(jq -s '.[0] * .[1]' /etc/docker/daemon.json /etc/docker/daemon.json.coolify) >/etc/docker/daemon.json +TEMP_FILE=$(mktemp) +if ! jq -s '.[0] * .[1]' /etc/docker/daemon.json /etc/docker/daemon.json.coolify > "$TEMP_FILE"; then + echo "Error merging JSON files" + exit 1 +fi +mv "$TEMP_FILE" /etc/docker/daemon.json -if [ -s /etc/docker/daemon.json.original-$DATE ]; then - DIFF=$(diff <(jq --sort-keys . /etc/docker/daemon.json) <(jq --sort-keys . /etc/docker/daemon.json.original-$DATE)) +if [ -s /etc/docker/daemon.json.original-"$DATE" ]; then + DIFF=$(diff <(jq --sort-keys . /etc/docker/daemon.json) <(jq --sort-keys . /etc/docker/daemon.json.original-"$DATE")) if [ "$DIFF" != "" ]; then echo "Docker configuration updated, restart docker daemon..." systemctl restart docker @@ -167,11 +173,11 @@ if [ ! -f ~/.ssh/authorized_keys ]; then addSshKey fi -if [ -z "$(grep -w "root@coolify" ~/.ssh/authorized_keys)" ]; then +if ! grep -qw "root@coolify" ~/.ssh/authorized_keys; then addSshKey fi -bash /data/coolify/source/upgrade.sh ${LATEST_VERSION:-latest} +bash /data/coolify/source/upgrade.sh "${LATEST_VERSION:-latest}" echo -e "\nCongratulations! Your Coolify instance is ready to use.\n" echo "Please visit http://$(curl -4s https://ifconfig.io):8000 to get started." From 35134f23279ea27152b94fb7930440be5d4629a5 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Mon, 11 Dec 2023 16:32:41 +0100 Subject: [PATCH 03/30] fix: pusher host --- config/sentry.php | 2 +- config/version.php | 2 +- resources/views/layouts/base.blade.php | 7 ++++--- versions.json | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/config/sentry.php b/config/sentry.php index 6ce447961..1cd69403b 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -7,7 +7,7 @@ return [ // The release version of your application // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')) - 'release' => '4.0.0-beta.156', + 'release' => '4.0.0-beta.157', // When left empty or `null` the Laravel environment will be used 'environment' => config('app.env'), diff --git a/config/version.php b/config/version.php index 0da84d93c..5c2f640e6 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@ -