Files
testing/scripts/provision-vm.sh
T

36 lines
916 B
Bash
Raw Normal View History

2026-04-28 19:47:21 +00:00
#!/usr/bin/env bash
set -euo pipefail
export DEBIAN_FRONTEND=noninteractive
apt-get update
2026-04-29 01:30:21 +00:00
apt-get install -y ca-certificates curl git docker.io openssl unzip
2026-04-28 19:47:21 +00:00
if [ -d /serve.zone ]; then
chown -R vagrant:vagrant /serve.zone
fi
systemctl enable --now docker
usermod -aG docker vagrant || true
if ! command -v node >/dev/null 2>&1; then
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt-get install -y nodejs
fi
2026-04-29 01:30:21 +00:00
if ! command -v deno >/dev/null 2>&1; then
curl -fsSL https://deno.land/install.sh | DENO_INSTALL=/usr/local sh
fi
2026-04-28 19:47:21 +00:00
corepack enable
corepack prepare pnpm@10.7.0 --activate
swarm_state="$(docker info --format '{{.Swarm.LocalNodeState}}' 2>/dev/null || true)"
if [ "${swarm_state}" = "inactive" ]; then
docker swarm init --advertise-addr 127.0.0.1
fi
docker pull caddy:2-alpine
docker pull node:22-trixie-slim
2026-04-29 01:30:21 +00:00
docker pull code.foss.global/host.today/ht-docker-smartproxy:latest