-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subdomain support for ngrok #5
Comments
I have been working on the entrypoint and made some edits that have the subdomain option working. The only problem I see right now is that the user is required to add a fourth parameter value of "auto" even if they don't want to use the subdomain. The tunnel attribute with my solution adds on an additional parameter at the end so that there are 4 parameters, each separated by colons. See below.
|
Hey @ryandroid226, I coincidentally began looking at how to extend the For what it's worth, an initial approach I had taken was to add my subdomain-ed tunnels directly to the I'll also add, I've been examining the code/issues on wernight/docker-ngrok as a point of reference on how we might address this here. |
Hey @miquelbrazil, I'm glad to see someone else has interest in subdomain support for this ngrok container! I've thought of two ways to make this work a little better but my bash-scripting-foo is pretty weak as well. The first way would involve adding a check earlier on in the script that would allow 3 OR 4 parameters so that the parameter is simply optional. However, I don't think the subdomain really belongs where I placed it. I think it would be better suited as an additional parameter in the .env file with some type of indicator as to which tunnel the subdomain belongs to since there is the option to handle multiple tunnels. Maybe this is as simple as adding a subdomain variable to the .env file and just passing an empty string if no subdomain is needed. For example, if you have I'm probably going to try a few things within the next couple of days to see if I can come up with something a little more elegant but I'm also interested to see what you come up with so I'll keep a look out for that pull request. |
I actually think including the subdomain in the tunnel string is a good approach. This allows the subdomain to remain matched to the project and not present when it isn't necessary for that tunnel. Including the subdomain as a separate An obvious format would be to include the subdomain as part of the virtual host domain (i.e. Extending your initial approach a bit, let's assume for a moment subdomains for tunneling can only be one level deep (i.e. Taking this a step further, if we wanted to support multi-level subdomains (I never actually checked if it's even possible to register multi-level subdomains in the ngrok admin panel) then we might consider adding a new delimiter (possibly the TBH, I sort of like this second implementation better because it means the parsing for the standard format can remain untouched. All we would need to add is a function before it that detects the presence of the |
Hi @cytopia, I would like to request subdomain support for the ngrok container. I believe this could be implemented by making a few small edits to the docker-entrypoint.sh file, under the HTTP TUNNELS section. The third example under this link shows how the subdomain is added to the config.
The text was updated successfully, but these errors were encountered: