Merge pull request #189 from KeepTruckin/issue-188/volumes-support
Add support for volumes to mount host paths
This commit is contained in:
commit
7e98b7af10
2 changed files with 7 additions and 0 deletions
|
@ -33,6 +33,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": "3.4",
|
"version": "3.4",
|
||||||
|
"volumes": {},
|
||||||
"x-arion": {
|
"x-arion": {
|
||||||
"images": [
|
"images": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -63,6 +63,11 @@ in
|
||||||
type = lib.types.attrsOf (lib.types.submodule service);
|
type = lib.types.attrsOf (lib.types.submodule service);
|
||||||
description = "An attribute set of service configurations. A service specifies how to run an image as a container.";
|
description = "An attribute set of service configurations. A service specifies how to run an image as a container.";
|
||||||
};
|
};
|
||||||
|
docker-compose.volumes = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf lib.types.unspecified;
|
||||||
|
description = "A attribute set of volume configurations.";
|
||||||
|
default = {};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
config = {
|
config = {
|
||||||
out.dockerComposeYaml = pkgs.writeText "docker-compose.yaml" config.out.dockerComposeYamlText;
|
out.dockerComposeYaml = pkgs.writeText "docker-compose.yaml" config.out.dockerComposeYamlText;
|
||||||
|
@ -73,6 +78,7 @@ in
|
||||||
version = "3.4";
|
version = "3.4";
|
||||||
services = lib.mapAttrs (k: c: c.out.service) config.services;
|
services = lib.mapAttrs (k: c: c.out.service) config.services;
|
||||||
x-arion = config.docker-compose.extended;
|
x-arion = config.docker-compose.extended;
|
||||||
|
volumes = config.docker-compose.volumes;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue