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.

chore: Update Coolify installer and scripts to include a function for fetching programming jokes

Andras Bacsaid2d56f136bd9
diff --git a/other/nightly/install.sh b/other/nightly/install.sh
index 1747d80e12..c8731a961a 100755
--- a/other/nightly/install.sh
+++ b/other/nightly/install.sh
@@ -21,6 +21,13 @@ INSTALLATION_LOG_WITH_DATE="/data/coolify/source/installation-${DATE}.log"
exec > >(tee -a $INSTALLATION_LOG_WITH_DATE) 2>&1
+getAJoke() {
+ JOKES=$(curl -s --max-time 2 https://v2.jokeapi.dev/joke/Programming?format=txt&type=single&amount=1 || true)
+ if [ "$JOKES" != "" ]; then
+ echo -e " - Until then, here's a joke for you:\n"
+ echo -e "$JOKES\n"
+ fi
+}
CDN="https://cdn.coollabs.io/coolify-nightly"
OS_TYPE=$(grep -w "ID" /etc/os-release | cut -d "=" -f 2 | tr -d '"')
ENV_FILE="/data/coolify/source/.env"
@@ -202,6 +209,7 @@ fi
echo -e "3. Check Docker Installation. "
if ! [ -x "$(command -v docker)" ]; then
echo " - Docker is not installed. Installing Docker. It may take a while."
+ getAJoke
case "$OS_TYPE" in
"almalinux")
dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo >/dev/null 2>&1
@@ -477,22 +485,14 @@ chmod -R 700 /data/coolify
echo -e "9. Installing Coolify ($LATEST_VERSION)"
echo -e " - It could take a while based on your server's performance, network speed, stars, etc."
echo -e " - Please wait."
-JOKES=$(curl -s https://v2.jokeapi.dev/joke/Programming?format=txt&type=single&amount=1 || true)
-if [ "$JOKES" != "" ]; then
- echo -e " - Until then, here's a joke for you:\n"
- echo -e "$JOKES\n"
-fi
+getAJoke
bash /data/coolify/source/upgrade.sh "${LATEST_VERSION:-latest}" "${LATEST_HELPER_VERSION:-latest}" >/dev/null 2>&1
echo " - Coolify installed successfully."
rm -f $ENV_FILE-$DATE
echo " - Waiting for 20 seconds for Coolify (database migrations) to be ready."
-JOKES=$(curl -s https://v2.jokeapi.dev/joke/Programming?format=txt&type=single&amount=1 || true)
-if [ "$JOKES" != "" ]; then
- echo -e " - Until then, here's a joke for you:\n"
- echo -e "$JOKES\n"
-fi
+getAJoke
sleep 20
echo -e "\033[0;35m
diff --git a/scripts/install.sh b/scripts/install.sh
index 1747d80e12..165d0c07af 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -21,7 +21,14 @@ INSTALLATION_LOG_WITH_DATE="/data/coolify/source/installation-${DATE}.log"
exec > >(tee -a $INSTALLATION_LOG_WITH_DATE) 2>&1
-CDN="https://cdn.coollabs.io/coolify-nightly"
+getAJoke() {
+ JOKES=$(curl -s --max-time 2 https://v2.jokeapi.dev/joke/Programming?format=txt&type=single&amount=1 || true)
+ if [ "$JOKES" != "" ]; then
+ echo -e " - Until then, here's a joke for you:\n"
+ echo -e "$JOKES\n"
+ fi
+}
+CDN="https://cdn.coollabs.io/coolify"
OS_TYPE=$(grep -w "ID" /etc/os-release | cut -d "=" -f 2 | tr -d '"')
ENV_FILE="/data/coolify/source/.env"
@@ -202,6 +209,7 @@ fi
echo -e "3. Check Docker Installation. "
if ! [ -x "$(command -v docker)" ]; then
echo " - Docker is not installed. Installing Docker. It may take a while."
+ getAJoke
case "$OS_TYPE" in
"almalinux")
dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo >/dev/null 2>&1
@@ -477,22 +485,14 @@ chmod -R 700 /data/coolify
echo -e "9. Installing Coolify ($LATEST_VERSION)"
echo -e " - It could take a while based on your server's performance, network speed, stars, etc."
echo -e " - Please wait."
-JOKES=$(curl -s https://v2.jokeapi.dev/joke/Programming?format=txt&type=single&amount=1 || true)
-if [ "$JOKES" != "" ]; then
- echo -e " - Until then, here's a joke for you:\n"
- echo -e "$JOKES\n"
-fi
+getAJoke
bash /data/coolify/source/upgrade.sh "${LATEST_VERSION:-latest}" "${LATEST_HELPER_VERSION:-latest}" >/dev/null 2>&1
echo " - Coolify installed successfully."
rm -f $ENV_FILE-$DATE
echo " - Waiting for 20 seconds for Coolify (database migrations) to be ready."
-JOKES=$(curl -s https://v2.jokeapi.dev/joke/Programming?format=txt&type=single&amount=1 || true)
-if [ "$JOKES" != "" ]; then
- echo -e " - Until then, here's a joke for you:\n"
- echo -e "$JOKES\n"
-fi
+getAJoke
sleep 20
echo -e "\033[0;35m