refactor(dev): replace v5:sync-dev-lima-servers with V5DevLimaSeeder

Switch Lima VM dev-environment sync from a custom Artisan command to a
database seeder. The seeder creates/updates the Development-Lima cluster
and its two servers idempotently, reading ssh_user from the
COOLIFY_CLI_SSH_USER env var (exposed via config('coold.dev_ssh_user')).

dev.sh now passes COOLIFY_CLI_SSH_USER and runs db:seed instead of
building per-server --server flag arrays.
This commit is contained in:
Andras Bacsai
2026-06-16 17:10:40 +02:00
parent 9566b259b2
commit 295addb6b0
7 changed files with 129 additions and 22 deletions
+6 -18
View File
@@ -417,29 +417,17 @@ follow_logs() {
}
sync_v5_dev_lima_servers() {
local count
local builder_capacity
local args=()
local instance
local node
local ssh_user
count="$(coold_vm_count)"
builder_capacity="$(read_coolify_env COOLIFY_COOLD_VM_BUILDER_CAPACITY 2)"
for index in $(seq 1 "$count"); do
instance="$(coold_vm_instance "$index")"
node="$(lima_ssh_target "$index")"
args+=(--server "${instance}|${node}|$(coolify_ssh_user)|22")
done
ssh_user="$(coolify_ssh_user)"
echo "==> Running pending migrations before syncing v5 dev Lima state..."
spin exec -T coolify php artisan migrate --force
echo "==> Syncing dev Lima VM(s) into v5 clusters/servers..."
spin exec -T coolify php artisan v5:sync-dev-lima-servers \
--cluster="Development-Lima" \
--builder-capacity="$builder_capacity" \
"${args[@]}"
echo "==> Seeding dev Lima VM(s) into v5 clusters/servers..."
spin exec -T \
-e COOLIFY_CLI_SSH_USER="$ssh_user" \
coolify php artisan db:seed --class=V5DevLimaSeeder --force
}
configure_flux_dev_for_vm() {