pimcore/demo

[Bug]: nginx $realpath_root empty

gvanto opened this issue · 3 comments

Expected behavior

Note: This isn't really a bug, more of a question ✌️

The following line to work:
https://github.com/pimcore/demo/blob/2024.x/.docker/nginx.conf#L138C40-L138C53

Actual behavior

nginx not finding index.php - $realpath_root is empty

Using nginx/1.21.6

Steps to reproduce

Run the project and try to access

OK turns out realpath_root is only set when the following volume is mounted in the nginx container (in my aws ecs nginx container nothing is being mounted)

  • .:/var/www/html:ro

From what I understand the nginx container pass the (php) file to the fpm-php container, so why is the html folder being mounted in the docker-compose file here?

https://github.com/pimcore/demo/blob/2024.x/docker-compose.yaml#L25

Cause the bundle assets are served by nginx. As well as assets if they are on a mounted filesystem