mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
- Proxy: list and delete Traefik ACME certificates from the server proxy page via new TraefikAcmeService and Get/DeleteTraefikCertificate actions - DNS: track ownership and cross-resource references for managed DNS records so records are only deleted when no longer referenced; release records asynchronously on resource deletion via ReleaseManagedDnsRecordsJob and ManagedDnsRecordCleanup; harden Cloudflare provider deletion results - Databases: fail closed on start when prerequisites or the CA certificate are missing (DatabaseStartException, Server::ensureCaCertificate) and clean up stale start activities via ResourceStartActivity - Webhooks: throttle repeated manual webhook signature failures for GitHub, GitLab, Gitea and Bitbucket - Deployments: improve compose build-context handling and compose file load error reporting - Install scripts: rework terminal UI output in install.sh (stable and nightly) - Misc: settings sidebar accordion fixes, log drain toggle rollback, add Serverside to README sponsors - Add migrations and tests covering the above
32 lines
1.1 KiB
PHP
32 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\DnsProviderZone;
|
|
use App\Models\ManagedDnsRecord;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class ManagedDnsRecordFactory extends Factory
|
|
{
|
|
protected $model = ManagedDnsRecord::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'dns_provider_zone_id' => DnsProviderZone::factory(),
|
|
'integration_token_id' => fn (array $attributes) => DnsProviderZone::query()->findOrFail($attributes['dns_provider_zone_id'])->integration_token_id,
|
|
'team_id' => fn (array $attributes) => DnsProviderZone::query()->findOrFail($attributes['dns_provider_zone_id'])->integrationToken->team_id,
|
|
'provider_record_id' => fake()->uuid(), 'type' => 'A', 'name' => fake()->domainName(), 'content' => fake()->ipv4(),
|
|
'owned' => false,
|
|
];
|
|
}
|
|
|
|
/**
|
|
* A record Coolify created itself (carries the ownership comment in the provider).
|
|
*/
|
|
public function owned(): static
|
|
{
|
|
return $this->state(fn (array $attributes) => ['owned' => true]);
|
|
}
|
|
}
|