diff --git a/pkg/config/config.go b/pkg/config/config.go index 663fd1f..0dfb6d7 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -68,7 +68,7 @@ type Storage struct { Name string `yaml:"name" validate:"required"` Image string `yaml:"image" validate:"required"` Volumes []string `yaml:"volumes" validate:"dive,volume_reference"` - EnvVars []string `yaml:"env_vars" validate:"dive"` + EnvVars []EnvVar `yaml:"env_vars" validate:"dive"` } type Volume struct { diff --git a/pkg/deployment/deployment.go b/pkg/deployment/deployment.go index c796a67..a575c4a 100644 --- a/pkg/deployment/deployment.go +++ b/pkg/deployment/deployment.go @@ -144,6 +144,7 @@ func (d *Deployment) startStorage(storage *config.Storage, network string) error Name: storage.Name, Image: storage.Image, Volumes: storage.Volumes, + EnvVars: storage.EnvVars, } if err := d.startContainer(service, network, ""); err != nil { return fmt.Errorf("failed to start container for %s: %v", storage.Image, err) diff --git a/schemas/ftl-schema.json b/schemas/ftl-schema.json index 8177326..faeb2f2 100644 --- a/schemas/ftl-schema.json +++ b/schemas/ftl-schema.json @@ -100,7 +100,7 @@ "type": "array", "items": { "type": "object", - "required": ["name", "image"], + "required": ["name", "image", "volumes"], "properties": { "name": { "type": "string" }, "image": { "type": "string" }, @@ -110,7 +110,17 @@ }, "env_vars": { "type": "array", - "items": { "type": "string" } + "items": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + } + } + } } } }