I haven't really used Nginx, but from a quick look nginx seems to be restarting everytime as it attempts to delete some proxy configuration (?), but fails to do so with code "ENOENT" which just means that such file or directory does not exist.
According to the discussion in that issue, it seems like nginx is the one causing the problems. Consider downgrading the nginx container image to what it was before if it updated itself.
It also could be something being corrupted, so you might need to dig some more into this matter.
People also recommend switching to other reverse proxies like caddy and traefik.
I also recommend it, you might as well take this as a opportunity to use something better.
I personally recommend Caddy, as it is very simple to configure and very convenient.
It handles HTTPS and all that boring stuff for you. Iirc it also has a cloudflare module, so you can just follow the guide in the documentations to let Caddy automatically renew certs for you via access tokens.
I don't see anything wrong in the logs. Must be something else.
Can you reach the piped container through localhost? Did you try to access it without the cloudflare proxy (it can be disabled in the cloudflare dns settings)?
Also check what the other guy said, it also could be that.
It seems like the 522 CF error happens when the connection times out (the server did not respond within x seconds). Can you provide the logs for the Piped container?
That is highly unlikely to happen.
This was a response from dessalines, one of the lemmy devs:
@erlend-sh We have no association with whoever made photon, and they've never contributed to lemmy-ui or the lemmy backend. I don't see us accepting as "official", a front end that we have no control over.
King Terry the Terrible is watching everyone that uses TempleOS and will execute anyone who misuses it with an A10 gun, the fist of God.