feat: add registry deploy-on-push scenario
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#!/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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user