diff --git a/install.sh b/install.sh index 370cb5f..e03a351 100644 --- a/install.sh +++ b/install.sh @@ -1,7 +1,7 @@ #!/bin/bash # Non-interactive installer for Ubuntu hosts. -# - Installs docker and docker compose plugin if missing +# - Assumes docker and docker compose plugin are already installed # - Installs repo under /opt/ploughshares (uses current repo copy) # - Ensures .env exists (creates from .env.example if missing) # - Installs systemd unit and timer for stack management and daily restart @@ -18,21 +18,7 @@ SRC_DIR="$(cd "$(dirname "$0")" && pwd)" DEST_DIR="/opt/ploughshares" SYSTEMD_DIR="/etc/systemd/system" -echo "=== Installing prerequisites (docker, compose) ===" -if ! command -v docker >/dev/null 2>&1; then - apt-get update - apt-get install -y ca-certificates curl gnupg - install -m 0755 -d /etc/apt/keyrings - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg - chmod a+r /etc/apt/keyrings/docker.gpg - echo \ - "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ - $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ - tee /etc/apt/sources.list.d/docker.list > /dev/null - apt-get update - apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin - systemctl enable --now docker -fi +echo "=== Using existing Docker and compose installation ===" echo "=== Deploying repo to $DEST_DIR ===" mkdir -p "$DEST_DIR"