I think that you don’t need that proxy_pass right there in your app.yml. My stanza like that looks like this:
after_bundle_exec:
# This is the magic to get IP numbers transmitted to Discourse
# See https://meta.discourse.org/t/last-ip-address-and-action-dispatch-trusted-proxies/50098/3?u=pfaffman
- replace:
filename: /etc/nginx/conf.d/discourse.conf
from: "types {"
to: |
set_real_ip_from 192.168.1.0/24;
set_real_ip_from 172.18.0.0/24;
set_real_ip_from 172.17.0.0/24;
real_ip_recursive on;
real_ip_header X-Forwarded-For;
types {
But my code may be from before the switch to Debian in the containers.
You might try just editing that file inside the container and restarting nginx.