ddev / ddev-platformsh

Add integration with Platform.sh hosting service
Apache License 2.0
9 stars 10 forks source link

Set `/app` as working dir #6

Closed lolautruche closed 2 years ago

lolautruche commented 2 years ago

In Platform.sh container, the "app dir" is /app. As such, one expect the same in a local container. /app might be a symlink to /var/www/html.

The doc root (or web root) is always relative to this app dir and is defined in .platform.app.yaml (more details from the YAML reference)

rfay commented 2 years ago

We'll need more discussion about this one. Since the DDEV web container doesn't have the same structure as the Platform container, this may not be useful. I imagine you're suggesting this so that deployment hooks and the like can be used as-is, but it may be we should wait until we can think about running them before we take this on. Of course... this is easy... I just don't want to add eccentric things until I really understand why.

lolautruche commented 2 years ago

This is indeed mainly for the sake of hooks, as many people hardcode the /app directory instead of using the $PLATFORM_APP_DIR variable.

rfay commented 2 years ago

It's currently hard to officially set the working_dir as /app because of docker-compose behavior (it insists on creating the directory), but current behavior is that /app is there as a symlink, so any references to it should be OK.