Does not yet use the MainServiceBuiltEvent.
Meaning: Can only be used if the blueprint explicitly supports it.
Parses the key volumes
and adds the given volumes to the service
Note: volume-name can always be a volume name(named volume) or a host path(host volume)
If the volume is given as string then the string is seen as the path inside the container while the array key is seen as the volume-name
{
"volumes":{
"volume-name":"/path/in/volume"
}
}
If the value is given as object then the key path
is used for the path inside the container while the array key is used
as default volume-name.
Possible keys:
name
Overrides the array key as volume-name. Usually used ifvolumes
is a json arraypath
REQUIRED! Path inside the Containerdriver
Volume driver to use for this volume. Defaults tolocal
driver-options
Pass additional driver options to the driver.mount-options
Add additional mount options likerw
or a mount propagation.external
If set to trueexternal: true
is added to the volume definition. This causes rancher to use a global volume rather than create its own stack-prefixed volume
{
"volumes":{
"volume-name":{
"name":"volume-name",
"path":"/path/in/volume",
"mount-options":[
"slave"
],
"driver":"rancher-nfs",
"driver-options":{
"some-option":"1000"
}
}
}
}
{
"volumes":[
{
"name":"volume-name",
"path":"/path/in/volume",
"driver":"rancher-nfs",
"driver-options":{
"some-option":"1000"
}
}
]
}
- WebserverBlueprint
- PHP Cli Blueprint as of 1.2.0