From 1a57017911bf1607e95c32787c644d1302fde7e6 Mon Sep 17 00:00:00 2001 From: JJ Date: Mon, 7 Aug 2023 11:01:21 +0200 Subject: [PATCH 1/6] add rhel support to configure.sh --- configure.sh | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/configure.sh b/configure.sh index 15e21ad5b5..ac4790fee3 100644 --- a/configure.sh +++ b/configure.sh @@ -26,23 +26,34 @@ if [[ "$OSTYPE" == "darwin"* ]]; then fi # If linux -if [[ "$OSTYPE" != "darwin"* ]]; then +if [[ "$OSTYPE" == "linux-gnu"* ]]; then + local DISTRIB=$(awk -F= '/^ID/{print $2}' /etc/os-release) + if [[ ${DISTRIB} = "ubuntu"* ]]; then + echo "Grabbing latest apt caches" + sudo apt-get update + elif [[ ${DISTRIB} = "debian"* ]]; then echo "Grabbing latest apt caches" sudo apt update + fi fi + # clone oneuptime echo "Installing OneUptime 🟢" if [[ ! $(which git) ]]; then - if [[ "$OSTYPE" != "darwin"* ]]; then + if [[ "$OSTYPE" == "linux-gnu"* ]]; then + local DISTRIB=$(awk -F= '/^ID/{print $2}' /etc/os-release) + if [[ ${DISTRIB} = "ubuntu"* ]] || [[ ${DISTRIB} = "debian"* ]]; then sudo apt install -y git + elif [[ ${DISTRIB} = "fedora"* ]] || [[ ${DISTRIB} = "almalinux"* ]] || [[ ${DISTRIB} = "rockylinux"* ]] || [[ ${DISTRIB} = "rhel"* ]]; then + sudo dnf install git -y + fi fi if [[ "$OSTYPE" == "darwin"* ]]; then brew install git fi fi - if [[ $IS_DOCKER == "true" ]] then echo "This script should run in the docker container." @@ -89,12 +100,17 @@ if [[ ! $(which node) && ! $(node --version) ]]; then fi -if [[ ! $(which npm) && ! $(npm --version) ]]; then - if [[ "$OSTYPE" != "darwin"* ]]; then +if [[ ! $(which git) ]]; then + if [[ "$OSTYPE" == "linux-gnu"* ]]; then + local DISTRIB=$(awk -F= '/^ID/{print $2}' /etc/os-release) + if [[ ${DISTRIB} = "ubuntu"* ]] || [[ ${DISTRIB} = "debian"* ]]; then echo "Setting up NPM" sudo apt-get install -y npm - fi -fi + elif [[ ${DISTRIB} = "fedora"* ]] || [[ ${DISTRIB} = "almalinux"* ]] || [[ ${DISTRIB} = "rockylinux"* ]] || [[ ${DISTRIB} = "rhel"* ]]; then + echo "Setting up NPM" + sudo dnf install -y npm + fi + if [[ ! $(which docker) && ! $(docker --version) ]]; then echo "Setting up Docker" From aaea2ef2d10c6b0a3b7f3017978c85b4937c07d1 Mon Sep 17 00:00:00 2001 From: JJ Date: Mon, 7 Aug 2023 11:02:16 +0200 Subject: [PATCH 2/6] change readme to add RHEL --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d0c875c703..9a973aa0e4 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ The fastest and most reliable way to get started with OneUptime is signing up fo ### Open-source hobby single-server deploy with Docker Compose. -Deploy a single-server instance with docker compose on Debian / Ubuntu (we only support Debian / Ubuntu as of today). We recommend OneUptime on 16 GB / 8 Core Ubuntu Server. However you can run an instance on a much smaller server. +Deploy a single-server instance in one line on Debian / Ubuntu with Docker (we only support Debian / Ubuntu and RHEL derivarts with docker installed as of today). We run the smallest instance on 16 GB / 8 Core Ubuntu Server and we recommend these requirements for running your hobby server. Please make sure you have: - Docker and Docker Compose installed. From 862d85b0630f8a2ec5a2a40ff15204b8549f8e52 Mon Sep 17 00:00:00 2001 From: JJ Date: Mon, 7 Aug 2023 11:18:45 +0200 Subject: [PATCH 3/6] change DISTRIB to global var --- configure.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.sh b/configure.sh index ac4790fee3..2ea22ce231 100644 --- a/configure.sh +++ b/configure.sh @@ -27,7 +27,7 @@ fi # If linux if [[ "$OSTYPE" == "linux-gnu"* ]]; then - local DISTRIB=$(awk -F= '/^ID/{print $2}' /etc/os-release) + DISTRIB=$(awk -F= '/^ID/{print $2}' /etc/os-release) if [[ ${DISTRIB} = "ubuntu"* ]]; then echo "Grabbing latest apt caches" sudo apt-get update @@ -42,7 +42,7 @@ fi echo "Installing OneUptime 🟢" if [[ ! $(which git) ]]; then if [[ "$OSTYPE" == "linux-gnu"* ]]; then - local DISTRIB=$(awk -F= '/^ID/{print $2}' /etc/os-release) + DISTRIB=$(awk -F= '/^ID/{print $2}' /etc/os-release) if [[ ${DISTRIB} = "ubuntu"* ]] || [[ ${DISTRIB} = "debian"* ]]; then sudo apt install -y git elif [[ ${DISTRIB} = "fedora"* ]] || [[ ${DISTRIB} = "almalinux"* ]] || [[ ${DISTRIB} = "rockylinux"* ]] || [[ ${DISTRIB} = "rhel"* ]]; then @@ -102,7 +102,7 @@ fi if [[ ! $(which git) ]]; then if [[ "$OSTYPE" == "linux-gnu"* ]]; then - local DISTRIB=$(awk -F= '/^ID/{print $2}' /etc/os-release) + DISTRIB=$(awk -F= '/^ID/{print $2}' /etc/os-release) if [[ ${DISTRIB} = "ubuntu"* ]] || [[ ${DISTRIB} = "debian"* ]]; then echo "Setting up NPM" sudo apt-get install -y npm From 757ea664ed103ba92007ed94a10ee4027781f48f Mon Sep 17 00:00:00 2001 From: JJ Date: Mon, 7 Aug 2023 11:26:15 +0200 Subject: [PATCH 4/6] add rhel support to configure.sh --- configure.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/configure.sh b/configure.sh index 2ea22ce231..68576cfede 100644 --- a/configure.sh +++ b/configure.sh @@ -25,9 +25,9 @@ if [[ "$OSTYPE" == "darwin"* ]]; then fi fi -# If linux + if [[ "$OSTYPE" == "linux-gnu"* ]]; then - DISTRIB=$(awk -F= '/^ID/{print $2}' /etc/os-release) + local DISTRIB=$(awk -F= '/^ID/{print $2}' /etc/os-release) if [[ ${DISTRIB} = "ubuntu"* ]]; then echo "Grabbing latest apt caches" sudo apt-get update @@ -42,7 +42,7 @@ fi echo "Installing OneUptime 🟢" if [[ ! $(which git) ]]; then if [[ "$OSTYPE" == "linux-gnu"* ]]; then - DISTRIB=$(awk -F= '/^ID/{print $2}' /etc/os-release) + local DISTRIB=$(awk -F= '/^ID/{print $2}' /etc/os-release) if [[ ${DISTRIB} = "ubuntu"* ]] || [[ ${DISTRIB} = "debian"* ]]; then sudo apt install -y git elif [[ ${DISTRIB} = "fedora"* ]] || [[ ${DISTRIB} = "almalinux"* ]] || [[ ${DISTRIB} = "rockylinux"* ]] || [[ ${DISTRIB} = "rhel"* ]]; then @@ -54,6 +54,7 @@ if [[ ! $(which git) ]]; then fi fi + if [[ $IS_DOCKER == "true" ]] then echo "This script should run in the docker container." @@ -99,10 +100,9 @@ if [[ ! $(which node) && ! $(node --version) ]]; then fi fi - -if [[ ! $(which git) ]]; then +if [[ ! $(which npm) ]]; then if [[ "$OSTYPE" == "linux-gnu"* ]]; then - DISTRIB=$(awk -F= '/^ID/{print $2}' /etc/os-release) + local DISTRIB=$(awk -F= '/^ID/{print $2}' /etc/os-release) if [[ ${DISTRIB} = "ubuntu"* ]] || [[ ${DISTRIB} = "debian"* ]]; then echo "Setting up NPM" sudo apt-get install -y npm @@ -110,7 +110,8 @@ if [[ ! $(which git) ]]; then echo "Setting up NPM" sudo dnf install -y npm fi - + fi +fi if [[ ! $(which docker) && ! $(docker --version) ]]; then echo "Setting up Docker" From 94b01d8cd42e67f4eb4f5c253aa77f19b0db0524 Mon Sep 17 00:00:00 2001 From: JJ Date: Mon, 7 Aug 2023 11:33:49 +0200 Subject: [PATCH 5/6] change readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a973aa0e4..74c00698e2 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ The fastest and most reliable way to get started with OneUptime is signing up fo ### Open-source hobby single-server deploy with Docker Compose. -Deploy a single-server instance in one line on Debian / Ubuntu with Docker (we only support Debian / Ubuntu and RHEL derivarts with docker installed as of today). We run the smallest instance on 16 GB / 8 Core Ubuntu Server and we recommend these requirements for running your hobby server. +Deploy a single-server instance in one line on Debian / Ubuntu with Docker (we only support Debian / Ubuntu and RHEL derivarts with docker installed as of today). We recommend OneUptime on 16 GB / 8 Core Ubuntu Server. However you can run an instance on a much smaller server. Please make sure you have: - Docker and Docker Compose installed. From d9e551e0c7ea190eb94d7117d266eca0a61417ec Mon Sep 17 00:00:00 2001 From: JJ Date: Mon, 7 Aug 2023 11:36:06 +0200 Subject: [PATCH 6/6] change readme to upstream version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 74c00698e2..430cd0508b 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ The fastest and most reliable way to get started with OneUptime is signing up fo ### Open-source hobby single-server deploy with Docker Compose. -Deploy a single-server instance in one line on Debian / Ubuntu with Docker (we only support Debian / Ubuntu and RHEL derivarts with docker installed as of today). We recommend OneUptime on 16 GB / 8 Core Ubuntu Server. However you can run an instance on a much smaller server. +Deploy a single-server instance with docker compose on Debian / Ubuntu / RHEL with Docker (we only support Debian / Ubuntu and RHEL derivatives with docker installed as of today). We recommend OneUptime on 16 GB / 8 Core Ubuntu Server. However you can run an instance on a much smaller server. Please make sure you have: - Docker and Docker Compose installed.