Change port connect from browser

Hello everyone, I’m facing a issue when config port for service. I use nginx as a proxy handle ssl and pass all request to frappe web app. The app will make a request to create a connection to service, but value of port same as socketio_port in common_site_config.json and same port server start. I must expose the port from docker and the issue appear here, nginx and docker conflict handle the port. So, how to config the port in web app separate from docker port start?

Thank you!