An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix(scripts): read the Coolify version from the containers files
peaklabs-dev681a0e2aeeeb
diff --git a/scripts/patch.sh b/scripts/patch.shindex 5b785fce49..5cf29c4a0b 100755--- a/scripts/patch.sh+++ b/scripts/patch.sh@@ -49,10 +49,8 @@ check_installation() {}read_version() {- local image- image="$(docker inspect --format '{{.Image}}' coolify 2> /dev/null)" || die "the coolify container does not exist"- # Read from the image, because the mitigation advice was to stop the coolify container- current_version="$(docker run --rm --network none --entrypoint php -w /var/www/html "$image" bootstrap/getVersion.php < /dev/null 2> /dev/null)" || die "could not read the Coolify version from the coolify container"+ # Copy the file out of the container, because this also works when the mitigation advice was followed and the container is stopped+ current_version="$(docker cp coolify:/var/www/html/config/constants.php - 2> /dev/null | tar -xO 2> /dev/null | awk -F "'" "/'version' =>/ && !found { print \$(NF - 1); found = 1 }")" && [ -n "$current_version" ] || die "could not read the Coolify version from the coolify container"ok "Coolify $BOLD$current_version$RESET is installed"}