1. The problem I’m having:
Caddy in Docker seems to open and handle to the root dir before the volume mount is performed. Therefore it is working with the now ‘shadow’ directory, not with the visible dir that got mounted in.
2. Error messages and/or full log output:
There is no log. All what I did to prove my point was using to add an local file into the directory in question (/var/www/html
) and then run caddy.
I always got the file in the original dir, never that one that should had been mounted by docker compose.
Caddy:
:8080
root * /var/www/html
file_server
php_fastcgi php-fpm:9000
docker-compose.yaml
mycaddy:
image: caddy:latest
container_name: mycaddy
hostname: caddy
restart: always
ports:
- "8089:8080"
volumes:
- htvol:/var/www/html
depends_on:
- php-fpm
3. Caddy version:
v2.8.4 h1:q3pe0wpBj1OcHFZ3n/1nl4V4bxBrYoSoab7rL9BMYNk=
4. How I installed and ran Caddy:
See docker compose above
5. Links to relevant resources:
6. More
I found an workaround to this issue: If your file_server has ‘browse’ set, caddy seems to finally refresh. But only AFTER you displayed the browse listing at least once.
And yes. I also tried to mount to the official mounting point “/data” - same story.