-
Notifications
You must be signed in to change notification settings - Fork 3
Description
dmake volume current state
dmake supports 3 locations for volumes definitions:
services[].config.volumes
-
shared (named) volume mount: (there is only one shared volume behavior !)
- no host path by definition (like docker(-compose) named volumes)
- supports variable substitution in
targetpath
=> used to shared data between
servicesanddocker_links -
normal (host) volume mount:
- full host paths only: explicit error with relative host paths
- host paths are rewritten as relative to repo/.dmake/volumes/, but in fact it doesn work: it just mounts on the standard host path: dmake local mount volume: doesn't work as expected #241
=> bizarre, probably not used a lot, use
tests.data_volumesinstead: it supports variable substitution and no hack on host path .dmake/volumes. In practice only deprecated repos use it, others have migrated totests.data_volumes. -
always mounted
(- also SSH deploy usage: unused and deprecated for multiple years)
services[].tests.data_volumes
- no shared (named) volume support (yet?)
- supports file:// and s3://
sourcepath (but s3 not used anymore IIRC) - supports variable substitution in
container_volumeandsourcepaths - supports optional read-only
- supports relative host path for
source - always mounted
=> used for cache: avoid re-downloading large resources on each dmake execution.
docker_links[].volumes
-
shared (named) volume mount: (there is only one shared volume behavior !)
- no host path by definition (like docker(-compose) named volumes)
- supports variable substitution in
targetpath - always mounted
=> used to shared data between
servicesanddocker_links -
host volume mount:
- full host paths only: explicit error with relative host paths
- supports variable substitution in
host_volumepath - strangely in validator we require starting with
/(before variable substitution), but later when generatingdocker runoptions allow relative path, and reconstruct full path for docker - only mounted for
dmake shellanddmake run --docker-links-volumes-persistence
=> used for developers persistence, mainly on postgresql database
Needs
current usages/needs:
- cache (for both dev and tests):
tests.data_volumes - sharing (for both dev and tests): shared volumes:
volumesonservices[].configanddocker_links[] - persistence (for dev only): only available for
docker_linksfor now (but only with full host path: not great to write randomly in host; ideally would store that somewhere in repo root/.dmake)
new needs:
- need persistence for
servicestoo.- cleaner persistence: don't store on use-chosen full host paths: maybe in
repo_root/.dmake?
- cleaner persistence: don't store on use-chosen full host paths: maybe in
- (variable substitution everywhere)
- replace
docker_linksby realservices, see Deprecate docker links: services can fully replace them #366: need persistence forservices[].config.volumeslikedocker_links.volumeshave
deprecated needs:
- s3 not used anymore
(- delete other volumes related to deprecated Deployment types: ssh, aws beanstalk...)
maybe still allow persistence for dev vs cache on services but maybe do that with dmake.yml extra values in same volumes instead of split between config.volumes and tests.data_volumes ?