I’m trying to understand better how to configure the app for production. My DevOps skills are somewhat limited, so bare with me if I write something dumb
The url config is used by Phoenix to generate any public facing URLs. So this must be indeed your public domain name. In a similar fashion, I have the following config for my Phoenix app on Heroku (and thus also serving behind a load balancer);
Assuming the LB terminates TLS: don’t forget to make your Phoenix app aware that requests were actually made over HTTPS, based on the X-Forwarded-Proto (or similar) header. Otherwise Plug.Session will believe the request was made over HTTP and won’t set the ‘secure’ flag on session cookies (which would be bad).
The force_ssl endpoint option can be used for that, as explained here and here.