iamdork / compose

Command line replacement for docker-compose, adding dork magics.
MIT License
2 stars 2 forks source link

Proxy only supports HTTP(S) #18

Closed ohthehugemanatee closed 7 years ago

ohthehugemanatee commented 7 years ago

Sometimes you want to access a non-HTTP service from outside the container, such as dbgp or mysql. Since our only proxy is NGINX, those requests aren't possible.

pmelab commented 7 years ago

Only the HTTP protocol transports a domain header, which is used to determine which container to route the request to. For other protocols we have no idea whom to access.

Although we could add logic to bind them directly to the host, but I didn't want to add that as a default to avoid constant port clashes. I'm open for suggestions.

ohthehugemanatee commented 7 years ago

hm, didn't know that. Binding to the host is the normal docker behavior for "exposed ports", so we shouldn't break it by default.

The only alternative I can imagine would be to actually set up a different virtual IP or interface for each dork environment on the proxy. I think it's not worth the effort.

I think we should bind to the host directly.

pmelab commented 7 years ago

Since 5ac44c73e608b60ee75edf4ec299a70e5c56cd07 is actually not unbinding ports any more. but it will switch them to random ports to avoid clashes with multiple projects. dork-compose port mysql 3306 could be used for some shell magic.

Although, if you just need one project at a time, you can just disable the proxy plugin completely. Just remove it from DORK_PLUGINS.