I have done this, but instead of PHP, I have used Server Includes, which is a performant and simple way to add repeating headers and footers etc without extra dependecies. Nginx, Apache and Caddy all supports Server Includes, but with different syntax. I have used Caddys templating language, which I am most comfortable with.
There are still edge cases, but things have improved rapidly the last year or two, to the point that most docker-compose.yaml files can be run unmodified with podman-compose.
I have however moved away from compose in favor of running containers and pods as systemd services, which I really like. If you want to try it, make sure your distro has a reasonably new version of Podman, at least v4.4 ot newer. Debian stable has an older version, so I had to use the testing repos to get quadlets working.
I think this is where Anytype (https://anytype.io/) is headed!
In that case, I can recommend minicomputer’s like HP EliteDesk G2 800 Mini. You can get them with a variety of intel CPUs, they can take up to 32GB RAM, they have slot for M.2 disks and a regular 2.5" SSD – and they hardly use any power when idle, between 5 to 10 watts, depending on the CPU and CPU governor settings. They are sold used for ~€50 and if you buy newer generations you’ll get even more umpfh for a bit more cash.
In other words, very competetive with the Pi’s, only more available, cheaper and about the same power consumption!
I use Navidrome, it’s a single binary and gives you your own Spotify, kinda. It can be use with many other apps, in addition to the web interface, as it supports the subsonic protocol.