mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
feat(proxy): make the Traefik certificate resolver configurable per server
Coolify always added tls.certresolver=letsencrypt to generated HTTPS routers, so Traefik logged errors when the proxy used its own certificates (for example Cloudflare Origin CA) without that resolver. Add a server setting (default letsencrypt) in the proxy page and API. An empty value omits the resolver from resource labels, the Coolify dashboard routes, and the catch-all router. Closes #12138
This commit is contained in:
@@ -38,6 +38,7 @@ use OpenApi\Attributes as OA;
|
||||
'is_geoip_enabled' => ['type' => 'boolean'],
|
||||
'geoip_refresh_days' => ['type' => 'integer'],
|
||||
'traffic_ip_mode' => ['type' => 'string', 'enum' => ['full', 'anonymized', 'off']],
|
||||
'traefik_certificate_resolver' => ['type' => 'string', 'nullable' => true, 'description' => 'Traefik certificate resolver for generated HTTPS routers. Null when the proxy uses its own certificates.'],
|
||||
'is_reachable' => ['type' => 'boolean'],
|
||||
'is_sentinel_enabled' => ['type' => 'boolean'],
|
||||
'is_swarm_manager' => ['type' => 'boolean'],
|
||||
@@ -71,6 +72,11 @@ use OpenApi\Attributes as OA;
|
||||
)]
|
||||
class ServerSetting extends Model
|
||||
{
|
||||
/**
|
||||
* Allowed Traefik certificate resolver names; also keeps the value safe inside generated labels.
|
||||
*/
|
||||
public const string TRAEFIK_CERTIFICATE_RESOLVER_PATTERN = '/^[A-Za-z0-9_-]+$/';
|
||||
|
||||
public const int DEFAULT_SENTINEL_METRICS_REFRESH_RATE_SECONDS = 10;
|
||||
|
||||
public const int DEFAULT_SENTINEL_METRICS_HISTORY_DAYS = 7;
|
||||
@@ -134,6 +140,7 @@ class ServerSetting extends Model
|
||||
'geoip_refresh_days',
|
||||
'geoip_maxmind_license_key',
|
||||
'traffic_ip_mode',
|
||||
'traefik_certificate_resolver',
|
||||
'docker_version',
|
||||
'docker_version_checked_at',
|
||||
'compose_version',
|
||||
|
||||
Reference in New Issue
Block a user