Closed lolautruche closed 1 year ago
This really has to read both .platform.app.yaml + .platform/services.yaml right? They're like a poor-man's relational database?
RE: "Mount names", DDEV currently only has a concept of one mount, for example sites/default/files for Drupal or public/fileadmin in TYPO3. It's a limitation of DDEV but one that has rarely been an issue. It's worth considering extending this conceptually in DDEV but I think that might be a nontrivial operation that would help few users. Platform's maturity in supporting multiple "mounts" is much better... but we may have to make tradeoffs with this.
This really has to read both .platform.app.yaml + .platform/services.yaml right? They're like a poor-man's relational database?
Yes that's right. Services are actually configured in .platform/services.yaml
and referenced in .platform.app.yaml
.
It would be awesome if DDEV could benefit this improvement 🙂 .
In the meantime, I think we could only ensure that directories listed in mounts exist locally, so that the app doesn't fail using files in those. Also, this would ensure that ddev pull
doesn't fail on mounts.
Can you say more about mount names and why and how they would be used?
Platform.sh containers are readonly. However, it is possible to create r/w capable "mounts" within containers for directories that need write access (e.g., logs, uploads, cache, etc). What's important here is that we ensure those directories do exist.
For example:
mounts:
'web/uploads':
source: local
source_path: uploads
web/uploads
is the "name" of the mount, i.e. the writeable directory. It's the path in the app container, relative to the docroot.source
: can only be "local". We can ignoresource_path
: the path in the external mounted drive. We can ignore it as well.The only important part in this example is the "name" (web/uploads
). We need to ensure the directory actually exists, and to create it if needed on start.
I think this is complete. Closing, followups in separate issues.
Read basic settings from
.platform.app.yaml
and reflect them intoconfig.platformsh.yaml
$PLATFORM_
ones))