I have a similar issue. It looks like the docker is caching the old value for the env vars somewhere and not honoring changes. Even changing the env var via Console doesn't work.
To reproduce the issue:
- Set up Photoview
- Change SQL machine IP (I changed network range with a new router 192.168.0.x -> 192.168.1.x)
- Update in UnRAID to the new IP