Skip to content

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.

fix: use official install script with rancher (one will work for sure)

Andras Bacsaicd7852e4f9fe
diff --git a/app/Actions/Server/InstallDocker.php b/app/Actions/Server/InstallDocker.php
index 79863d989c..c347b41810 100644
--- a/app/Actions/Server/InstallDocker.php
+++ b/app/Actions/Server/InstallDocker.php
@@ -67,7 +67,7 @@ class InstallDocker
}
$command = $command->merge([
"echo 'Installing Docker Engine...'",
- "curl https://releases.rancher.com/install-docker/{$dockerVersion}.sh | sh",
+ "curl https://releases.rancher.com/install-docker/{$dockerVersion}.sh | sh || curl https://get.docker.com | sh -s -- --version {$dockerVersion}",
"echo 'Configuring Docker Engine (merging existing configuration with the required)...'",
"test -s /etc/docker/daemon.json && cp /etc/docker/daemon.json \"/etc/docker/daemon.json.original-`date +\"%Y%m%d-%H%M%S\"`\" || echo '{$config}' | base64 -d > /etc/docker/daemon.json",
"echo '{$config}' | base64 -d > /etc/docker/daemon.json.coolify",
diff --git a/app/Jobs/ContainerStatusJob.php b/app/Jobs/ContainerStatusJob.php
index 96fde2a401..ead13f81ae 100644
--- a/app/Jobs/ContainerStatusJob.php
+++ b/app/Jobs/ContainerStatusJob.php
@@ -312,8 +312,6 @@ class ContainerStatusJob implements ShouldQueue, ShouldBeEncrypted
if ($shouldStart) {
StartProxy::run($this->server, false);
$this->server->team?->notify(new ContainerRestarted('coolify-proxy', $this->server));
- } else {
- ray('Proxy could not be started.');
}
} catch (\Throwable $e) {
ray($e);
diff --git a/scripts/install.sh b/scripts/install.sh
index 85bc58aadd..1f62b735df 100644
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -59,15 +59,21 @@ sles | opensuse-leap | opensuse-tumbleweed)
esac
if ! [ -x "$(command -v docker)" ]; then
- echo "Docker is not installed. Installing Docker..."
+ echo "Docker is not installed. Installing Docker."
curl https://releases.rancher.com/install-docker/${DOCKER_VERSION}.sh | sh
if [ -x "$(command -v docker)" ]; then
echo "Docker installed successfully."
else
- echo "Docker installation failed."
- echo "Maybe your OS is not supported."
- echo "Please visit https://docs.docker.com/engine/install/ and install Docker manually to continue."
- exit 1
+ echo "Docker installation failed with Rancher script. Trying with official script."
+ curl https://get.docker.com | sh -s -- --version ${DOCKER_VERSION}
+ if [ -x "$(command -v docker)" ]; then
+ echo "Docker installed successfully."
+ else
+ echo "Docker installation failed with official script."
+ echo "Maybe your OS is not supported."
+ echo "Please visit https://docs.docker.com/engine/install/ and install Docker manually to continue."
+ exit 1
+ fi
fi
fi
echo -e "-------------"