add volumes to container as map
This commit is contained in:
parent
e621fb616a
commit
4ec32bafa7
@ -158,6 +158,10 @@ func SetConfig(mongoUrl string, database string, natsUrl string, lokiUrl string,
|
|||||||
Type: "string",
|
Type: "string",
|
||||||
ReadOnly: false,
|
ReadOnly: false,
|
||||||
}
|
}
|
||||||
|
m["volumes"] = resource_model.Model{
|
||||||
|
Type: "map[string]string",
|
||||||
|
ReadOnly: false,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
accessor.StoreOne(&resource_model.ResourceModel{
|
accessor.StoreOne(&resource_model.ResourceModel{
|
||||||
ResourceType: model,
|
ResourceType: model,
|
||||||
|
@ -9,17 +9,12 @@ import (
|
|||||||
"cloud.o-forge.io/core/oc-lib/tools"
|
"cloud.o-forge.io/core/oc-lib/tools"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Volume struct {
|
|
||||||
Name string `json:"name,omitempty" bson:"name,omitempty"` // Name is the volume name
|
|
||||||
Path string `json:"path,omitempty" bson:"path,omitempty"` // Path is the volume path
|
|
||||||
}
|
|
||||||
|
|
||||||
type Container struct {
|
type Container struct {
|
||||||
Image string `json:"image,omitempty" bson:"image,omitempty"` // Image is the container image
|
Image string `json:"image,omitempty" bson:"image,omitempty"` // Image is the container image
|
||||||
Command string `json:"command,omitempty" bson:"command,omitempty"` // Command is the container command
|
Command string `json:"command,omitempty" bson:"command,omitempty"` // Command is the container command
|
||||||
Args string `json:"args,omitempty" bson:"args,omitempty"` // Args is the container arguments
|
Args string `json:"args,omitempty" bson:"args,omitempty"` // Args is the container arguments
|
||||||
Env map[string]string `json:"env,omitempty" bson:"env,omitempty"` // Env is the container environment variables
|
Env map[string]string `json:"env,omitempty" bson:"env,omitempty"` // Env is the container environment variables
|
||||||
Volumes []Volume
|
Volumes map[string]string `json:"volumes,omitempty" bson:"volumes,omitempty"` // Volumes is the container volumes
|
||||||
}
|
}
|
||||||
|
|
||||||
type Expose struct {
|
type Expose struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user