Clarify GeoIP update env setup for cached config deployments.
Deploy Ladill Link / deploy (push) Successful in 41s

Point operators at shared/.env and config:clear when MaxMind credentials are missing.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-04 23:45:24 +00:00
co-authored by Cursor
parent 344bf76391
commit 5e87debe32
3 changed files with 23 additions and 4 deletions
@@ -15,11 +15,26 @@ class UpdateGeoIpDatabaseCommand extends Command
public function handle(): int
{
$accountId = (string) config('link.maxmind_account_id', '');
$licenseKey = (string) config('link.maxmind_license_key', '');
$accountId = trim((string) config('link.maxmind_account_id', ''));
$licenseKey = trim((string) config('link.maxmind_license_key', ''));
if ($accountId === '' || $licenseKey === '') {
$this->error('Set MAXMIND_ACCOUNT_ID and MAXMIND_LICENSE_KEY in .env before updating GeoIP data.');
$envPath = realpath(base_path('.env')) ?: base_path('.env');
$configCached = is_file(base_path('bootstrap/cache/config.php'));
$this->error('Set MAXMIND_ACCOUNT_ID and MAXMIND_LICENSE_KEY before updating GeoIP data.');
$this->line('');
$this->line('Production uses the shared env file (current/.env is usually a symlink):');
$this->line(' '.$envPath);
$this->line('');
$this->line('Add both variables there, then refresh config:');
$this->line(' php artisan config:clear');
$this->line(' php artisan link:geoip-update');
$this->line(' php artisan config:cache');
if ($configCached) {
$this->warn('Config is cached — Laravel will ignore new .env values until you run config:clear.');
}
return self::FAILURE;
}