mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
feat: concatenate custom Caddy configs for services into final Caddyfile (no upstream interpolation)
This commit is contained in:
1 parent
8bf9fc0c9c
commit
03970862ab
6 files changed
+267
-188
No files matched your search
@@ -62,6 +62,14 @@ type ServiceSpec struct {
|
||||
Volumes []VolumeSpec
|
||||
}
|
||||
|
||||
// CaddyConfig returns the Caddy reverse proxy configuration for the service or an empty string if it's not defined.
|
||||
func (s *ServiceSpec) CaddyConfig() string {
|
||||
if s.Caddy == nil {
|
||||
return ""
|
||||
}
|
||||
return strings.TrimSpace(s.Caddy.Config)
|
||||
}
|
||||
|
||||
func (s *ServiceSpec) Volume(name string) (VolumeSpec, bool) {
|
||||
for _, v := range s.Volumes {
|
||||
if v.Name == name {
|
||||
|
||||
Reference in new issue
Block a user