fix install scripts

This commit is contained in:
Simon Larsen
2022-11-09 18:23:01 +00:00
parent aac2a91a22
commit 77530a572e
2 changed files with 32 additions and 32 deletions

View File

@@ -4,37 +4,6 @@ set -e
bash preinstall.sh
if [[ ! $(which docker) && ! $(docker --version) ]]; then
echo "Setting up Docker"
sudo curl -sSL https://get.docker.com/ | sh
fi
# If docker still fails to install, then quit.
if [[ ! $(which docker) && ! $(docker --version) ]]; then
echo -e "Failed to install docker. Please install Docker manually here: https://docs.docker.com/install."
echo -e "Exiting the OneUptime installer."
exit
fi
# enable docker without sudo
sudo usermod -aG docker "${USER}" || true
if [[ ! $(which docker-compose) && ! $(docker-compose --version) ]]; then
mkdir -p /usr/local/lib/docker/cli-plugins
curl -SL https://github.com/docker/compose/releases/download/v2.12.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/lib/docker/cli-plugins
sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
docker compose version
fi
# If docker still fails to install, then quit.
if [[ ! $(which docker-compose) && ! $(docker-compose --version) ]]; then
echo -e "Failed to install docker-domcpose. Please install Docker Compose manually here: https://docs.docker.com/compose/install/linux/#install-the-plugin-manually."
echo -e "Exiting the OneUptime installer."
exit
fi
npm run start
echo "We will need to wait ~5-10 minutes for things to settle down, migrations to finish, and TLS certs to be issued"

View File

@@ -94,8 +94,39 @@ if [[ ! $(which node) && ! $(node --version) ]]; then
fi
fi
if [[ ! $(which docker) && ! $(docker --version) ]]; then
echo "Setting up Docker"
sudo curl -sSL https://get.docker.com/ | sh
fi
# If docker still fails to install, then quit.
if [[ ! $(which docker) && ! $(docker --version) ]]; then
echo -e "Failed to install docker. Please install Docker manually here: https://docs.docker.com/install."
echo -e "Exiting the OneUptime installer."
exit
fi
# enable docker without sudo
sudo usermod -aG docker "${USER}" || true
if [[ ! $(which docker-compose) && ! $(docker-compose --version) ]]; then
mkdir -p /usr/local/lib/docker/cli-plugins
curl -SL https://github.com/docker/compose/releases/download/v2.12.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/lib/docker/cli-plugins
sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose
docker compose version
fi
# If docker still fails to install, then quit.
if [[ ! $(which docker-compose) && ! $(docker-compose --version) ]]; then
echo -e "Failed to install docker-domcpose. Please install Docker Compose manually here: https://docs.docker.com/compose/install/linux/#install-the-plugin-manually."
echo -e "Exiting the OneUptime installer."
exit
fi
if [[ ! $(which gomplate) ]]; then
sudo npm install -g gomplate
alias gomplate='docker run hairyhenderson/gomplate:stable'
fi
if [[ ! $(which ts-node) ]]; then