env.sh.eex generated by fly vs local docker compose env

More of a note for others (and myself) to find again in the future. It took me forever to find the following issue:

My local docker compose production release build did connect to postgres anymore. As this was not used recently, I had no idea when this broke. dev builds used for testing in our CI pipeline worked properly.

The issue: the fly generated env.sh.eex (only loaded in prod / release builds) is not compatible with a local docker compose config. Maybe due to IPv6? Did not investigate in detail.

Hope this helps anyone else. Also: maybe this could be considered by fly launch somehow and not break classic compose by adding fly specifics via env.sh.eex?