install: assume docker/compose preinstalled; remove package installation
ci/woodpecker/push/woodpecker Pipeline was successful Details

This commit is contained in:
colin 2025-08-27 19:13:43 -04:00
parent e1a2350cd0
commit 4276c0bdf1
1 changed files with 2 additions and 16 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# Non-interactive installer for Ubuntu hosts. # 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) # - Installs repo under /opt/ploughshares (uses current repo copy)
# - Ensures .env exists (creates from .env.example if missing) # - Ensures .env exists (creates from .env.example if missing)
# - Installs systemd unit and timer for stack management and daily restart # - 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" DEST_DIR="/opt/ploughshares"
SYSTEMD_DIR="/etc/systemd/system" SYSTEMD_DIR="/etc/systemd/system"
echo "=== Installing prerequisites (docker, compose) ===" echo "=== Using existing Docker and compose installation ==="
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 "=== Deploying repo to $DEST_DIR ===" echo "=== Deploying repo to $DEST_DIR ==="
mkdir -p "$DEST_DIR" mkdir -p "$DEST_DIR"