Update:
There is an anomaly regarding the rebuilding process (in the container) of the custom avatars in the "two container, nginx reverse proxy to unix socket" configuration.
See this post on meta:
Avatars lost after restore. How to get them back? - support - Discourse Meta
I have been working on this for a few days, and this issue only appears in the configuration of using nginx as a reverse proxy to a unix socket, but works fine without it.
So far, no resolution.