Refactored config system again
All checks were successful
Build (artifact) / build (push) Successful in 27s

This commit is contained in:
2026-06-30 16:48:05 -04:00
parent c01195643a
commit 0a78b70821
18 changed files with 478 additions and 175 deletions

View File

@@ -48,7 +48,7 @@ func init() {
func renewCert(domain string) error {
config := app.Config()
domainConfig, exists := app.DomainStore().Get(domain)
domainConfig, exists := app.ClientDomainStore().Get(domain)
if !exists {
return app.ErrConfigNotFound
}
@@ -62,17 +62,17 @@ func renewCert(domain string) error {
if err := client.PullCerts(config, gitWorkspace); err != nil {
return err
}
certsDir := common.EffectiveDataRoot(config, domainConfig)
certsDir := common.EffectiveDataRoot(config, domainConfig.Certificates.DataRoot)
return client.DecryptAndWriteCertificates(certsDir, config, domainConfig, gitWorkspace)
}
func updateLinks(domain string) error {
domainConfig, exists := app.DomainStore().Get(domain)
domainConfig, exists := app.ClientDomainStore().Get(domain)
if !exists {
return fmt.Errorf("domain %s does not exist", domain)
}
effectiveDataRoot := common.EffectiveDataRoot(app.Config(), domainConfig)
effectiveDataRoot := common.EffectiveDataRoot(app.Config(), domainConfig.Certificates.DataRoot)
certsDir := filepath.Join(effectiveDataRoot, "certificates", domain)
certLinks := domainConfig.Certificates.CertSymlinks