mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 19:13:34 +00:00
feat: concatenate custom Caddy configs for services into final Caddyfile (no upstream interpolation)
This commit is contained in:
@@ -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