You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The server_name being added to the streams module, I'm very interested in using it to create a rudimentary dynamic proxy to containerized databases for development environments. However, the regex capture as described in the documentation is not working for me. Perhaps I'm missing some more context about how this is supposed to work, and it might not actually work. 🤷
When I make a request using telnet, mysql, or curl to mysql.local.docker to the stream port 33306, I'm expecting the regex server_name ~^(?<service>.+).local.docker$; to capture the host and route the service to mysql, and I don't see that happening. The connection is not passed through.
Of course, makes a lot of sense! I was wondering if I either needed ssl or to use something with the proxy protocol. I'll try to work on a complete example for succinctness.
Environment
I'm trying everything in a docker-compose environment to keep things simple and repeatable. I've tried this with nginx=1.25.5 and newer.
docker-compose.yaml
nginx.conf
/etc/hosts
Description
The
server_name
being added to the streams module, I'm very interested in using it to create a rudimentary dynamic proxy to containerized databases for development environments. However, the regex capture as described in the documentation is not working for me. Perhaps I'm missing some more context about how this is supposed to work, and it might not actually work. 🤷When I make a request using telnet, mysql, or curl to
mysql.local.docker
to the stream port 33306, I'm expecting the regexserver_name ~^(?<service>.+).local.docker$;
to capture the host and route the service tomysql
, and I don't see that happening. The connection is not passed through.nginx configuration
The relevant nginx configuration:
nginx debug log
I can see no
$service
is captured here when I executetelnet mysql.local.docker 33306
. It ends up being the blank string.other things
I've tried a few different kind of regex captures, the numbered capture or even a complete capture
with no luck.
The text was updated successfully, but these errors were encountered: