Regular File Not Found Error PHP Container

I was having an issue launching another PHP application on the same device with Docker Compose.

You are having this issue because you have more than one container with same hostname (php) in same network.

As the above makes clear, it was because I had copied the compose.yml and used the same service name for the PHP container in Compose and the Caddyfile. Changing php to <app-name>-php in both Compose and Caddyfile fixed it.

Photos

Compose
  php:
    image: php-with-extensions:7.4
    container_name: photos-01-php-fpm
Caddyfile
:8091 {
    root * /media/photos
    file_server
    php_fastcgi php:9000
}

List

Compose
  php:
    image: php-with-extensions:7.4
    container_name: list-01-php-fpm
Caddyfile
:8098 {
    root * /var/www/html
    file_server
    php_fastcgi php:9000
}

About

I'm a technology professional who's been passionate about computers since my Grandad introduced me to an Intel 386 back in the 90s when I was a kid. Those moments inspired a passion within for technology, and I've been playing around with anything with a circuit board ever since. Whenever I have a moment you can probably find me working on something computer-related, and this is where I like to write about those moments.