install: assume docker/compose preinstalled; remove package installation
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
This commit is contained in:
parent
e1a2350cd0
commit
4276c0bdf1
18
install.sh
18
install.sh
|
@ -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"
|
||||||
|
|
Loading…
Reference in New Issue