2026-06-16 11:57:42 +00:00
|
|
|
# Lima VM for testing Coolify v5 against coolify-provisioned hosts.
|
2026-06-16 09:39:36 +00:00
|
|
|
# Start with: scripts/coold-vm.sh up
|
|
|
|
|
#
|
|
|
|
|
# This file is copied into .dev/lima/coold.generated.yaml by the wrapper script,
|
|
|
|
|
# with {{COOLIFY_REPO}}, {{COOLIFY_COOLD_VERSION}}, and {{COOLIFY_CORROSION_VERSION}} replaced before Lima sees it.
|
|
|
|
|
|
|
|
|
|
vmType: "vz"
|
|
|
|
|
arch: "default"
|
|
|
|
|
cpus: 4
|
|
|
|
|
memory: "8GiB"
|
|
|
|
|
disk: "100GiB"
|
|
|
|
|
containerd:
|
|
|
|
|
system: false
|
|
|
|
|
user: false
|
|
|
|
|
|
2026-06-19 05:23:45 +00:00
|
|
|
ssh:
|
|
|
|
|
localPort: {{COOLIFY_COOLD_VM_SSH_PORT}}
|
|
|
|
|
|
2026-06-16 09:39:36 +00:00
|
|
|
images:
|
|
|
|
|
- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-amd64.img"
|
|
|
|
|
arch: "x86_64"
|
|
|
|
|
- location: "https://cloud-images.ubuntu.com/releases/24.04/release/ubuntu-24.04-server-cloudimg-arm64.img"
|
|
|
|
|
arch: "aarch64"
|
|
|
|
|
|
|
|
|
|
mountType: "virtiofs"
|
|
|
|
|
mounts:
|
|
|
|
|
- location: "{{COOLIFY_REPO}}"
|
|
|
|
|
mountPoint: "/workspace/coolify"
|
|
|
|
|
writable: true
|
|
|
|
|
|
|
|
|
|
portForwards:
|
|
|
|
|
- guestPort: 5173
|
|
|
|
|
hostPort: 5173
|
|
|
|
|
hostIP: "127.0.0.1"
|
|
|
|
|
- guestPort: 3000
|
|
|
|
|
hostPort: 3000
|
|
|
|
|
hostIP: "127.0.0.1"
|
|
|
|
|
provision:
|
|
|
|
|
- mode: system
|
|
|
|
|
script: |
|
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
set -euxo pipefail
|
|
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
echo "[coold-vm] Updating Ubuntu package index..."
|
|
|
|
|
apt-get update
|
2026-06-16 10:33:26 +00:00
|
|
|
echo "[coold-vm] Installing minimal VM dependencies..."
|
2026-06-16 09:39:36 +00:00
|
|
|
apt-get install -y --no-install-recommends \
|
|
|
|
|
bash \
|
|
|
|
|
ca-certificates \
|
|
|
|
|
curl \
|
|
|
|
|
iproute2 \
|
|
|
|
|
jq \
|
|
|
|
|
openssl \
|
|
|
|
|
sqlite3 \
|
2026-06-16 10:33:26 +00:00
|
|
|
sudo
|
2026-06-16 09:39:36 +00:00
|
|
|
cat >/usr/local/bin/rtk <<'SH'
|
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
exec "$@"
|
|
|
|
|
SH
|
|
|
|
|
chmod +x /usr/local/bin/rtk
|
2026-06-16 10:33:26 +00:00
|
|
|
mkdir -p /etc/coolify /var/lib/coolify-dev
|
2026-06-16 09:39:36 +00:00
|
|
|
chmod 755 /etc/coolify
|
|
|
|
|
|
2026-06-19 05:23:45 +00:00
|
|
|
coolify_test_public_key="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFuGmoeGq/pojrsyP1pszcNVuZx9iFkCELtxrh31QJ68 sail@76ff66d2e2dd"
|
|
|
|
|
install -d -m 700 /root/.ssh
|
|
|
|
|
touch /root/.ssh/authorized_keys
|
|
|
|
|
grep -qxF "$coolify_test_public_key" /root/.ssh/authorized_keys || echo "$coolify_test_public_key" >>/root/.ssh/authorized_keys
|
|
|
|
|
chmod 600 /root/.ssh/authorized_keys
|
|
|
|
|
target_home="$(getent passwd 501 | cut -d: -f6 || true)"
|
|
|
|
|
if [ -n "$target_home" ] && [ -d "$target_home" ]; then
|
|
|
|
|
owner="$(stat -c '%u:%g' "$target_home")"
|
|
|
|
|
install -d -m 700 -o "${owner%:*}" -g "${owner#*:}" "$target_home/.ssh"
|
|
|
|
|
touch "$target_home/.ssh/authorized_keys"
|
|
|
|
|
grep -qxF "$coolify_test_public_key" "$target_home/.ssh/authorized_keys" || echo "$coolify_test_public_key" >>"$target_home/.ssh/authorized_keys"
|
|
|
|
|
chown "$owner" "$target_home/.ssh/authorized_keys"
|
|
|
|
|
chmod 600 "$target_home/.ssh/authorized_keys"
|
|
|
|
|
fi
|
|
|
|
|
|
2026-06-16 11:57:42 +00:00
|
|
|
echo "[coold-vm] Minimal provisioning complete. coolify bootstrap will install WireGuard, Podman, Corrosion, coold, and builder."
|