diff --git a/README.md b/README.md index d0c875c703..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 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 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. diff --git a/configure.sh b/configure.sh index 15e21ad5b5..68576cfede 100644 --- a/configure.sh +++ b/configure.sh @@ -25,17 +25,29 @@ if [[ "$OSTYPE" == "darwin"* ]]; then fi 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 @@ -88,11 +100,16 @@ if [[ ! $(which node) && ! $(node --version) ]]; then fi fi - -if [[ ! $(which npm) && ! $(npm --version) ]]; then - if [[ "$OSTYPE" != "darwin"* ]]; then +if [[ ! $(which npm) ]]; 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 + elif [[ ${DISTRIB} = "fedora"* ]] || [[ ${DISTRIB} = "almalinux"* ]] || [[ ${DISTRIB} = "rockylinux"* ]] || [[ ${DISTRIB} = "rhel"* ]]; then + echo "Setting up NPM" + sudo dnf install -y npm + fi fi fi