Deploying discourse on server already running another rails app

So, I installed HAproxy and configured my discourse Docker for subfolder support. I took an idea of configuring apache to listen to 8080 and docker on 8088 - not sure if it is possible to leave eg. docker on port 80 and somehow configure HAproxy to listen port 80 but route requests for subfolder docker installation to port 80. At first it seems like asking for an infinite loop, but I am not en expert with HAproxy :blush:

Hovewer, my server is behing proxy blocking all outgoing internet traffic. I noticed that system assigned avatars are broken. Question now is it possible to restore this avatars with local assets or a proxy config for accessing outside of my local network?