#!/usr/bin/env bash set -euo pipefail export DEBIAN_FRONTEND=noninteractive apt-get update apt-get install -y ca-certificates curl git docker.io openssl unzip 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 if ! command -v deno >/dev/null 2>&1; then curl -fsSL https://deno.land/install.sh | DENO_INSTALL=/usr/local sh fi 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 docker pull code.foss.global/host.today/ht-docker-smartproxy:latest