option('tries')); for ($i = 1; $i <= $tries; $i++) { if ($deployment->snapshotActiveDomain()) { $this->info('Active domain: '.($deployment->domain() ?? '(bare IP / HTTP)')); return self::SUCCESS; } if ($i < $tries) { sleep(1); } } // Settings never became readable in time. Keep any existing snapshot (last-known-good, // frozen); only if none exists, freeze the install-time env fallback — so the active // domain is always a FIXED snapshot and never falls back to a live value that could // change once the DB/migrations catch up (which would break the restart boundary). if ($deployment->hasSnapshot()) { $this->warn('Settings not reachable; kept the existing active-domain snapshot.'); } else { $deployment->snapshotFallback(); $this->warn('Settings not reachable; froze the install-time domain (dashboard override applies on the next ready restart).'); } return self::SUCCESS; } }