jhuckaby / Cronicle

A simple, distributed task scheduler and runner with a web based UI.
http://cronicle.net
Other
3.7k stars 382 forks source link

Use web_socket_use_base_app_url instead of web_socket_use_hostnames #123

Open lukasmrtvy opened 5 years ago

lukasmrtvy commented 5 years ago

It should be more consistent if We can use web_socket_use_base_app_url parameter instead of web_socket_use_hostnames to determine websocket endpoint, of course after setting base_app_url

web_socket_use_hostnames will not work if application will be behind reverse proxy.

I guess that this applies also for server_comm_use_hostnames parameter

jhuckaby commented 5 years ago

Thank you for the issue report. The entire websocket system is being redesigned for v1.0, and it will default to connect to the base URL in the browser, which should cover this. I'll make sure it is configurable as well.

lukasmrtvy commented 5 years ago

Any ETA for 1.0? Thanks

jhuckaby commented 5 years ago

Well, I am trying to get v1.0 completed before the end of the year, but don't quote me on that 😉 Cronicle is only a one-man team right now, and I only work on it in my spare time.

lukasmrtvy commented 5 years ago

Ok. Thanks, its great project.

marcok commented 5 years ago

Small info here:

I had troubles that the job log update did not work (start_live_log_watcher) with this config: "server_comm_use_hostnames": false, "web_direct_connect": false, "web_socket_use_hostnames": false,

then i copy pasted the url building logic as a hack from somewhere else, after that it works:

start_live_log_watcher: function(job) {
...

                var url = app.proto + this.masterHostname + ':' + this.port;
                if (!config.web_socket_use_hostnames && this.servers && this.servers[this.masterHostname] && this.servers[this.masterHostname].ip) {
                        // use ip instead of hostname if available
                        url = app.proto + this.servers[this.masterHostname].ip + ':' + this.port;
                }
                if (!config.web_direct_connect) {
                        url = app.proto + location.host;
                }
raphaelyancey commented 4 years ago

I also had trouble installing Cronicle behind a reverse proxy with a self-signed cert, because of that missing option. In a more global way, it would be great to make this kind of setup easier as it's becoming more and more used (a server with a reverse proxy and only 80/443 open, serving containers via domain names).