cozy / cozy-proxy

This repository was part of CozyV2 which has been deprecated - Cozy authentication and routing layer
https://blog.cozycloud.cc/post/2016/11/21/On-the-road-to-Cozy-version-3
GNU Affero General Public License v3.0
26 stars 31 forks source link

Adding a custom routes file #47

Open jsilvestre opened 10 years ago

jsilvestre commented 10 years ago

In order to allow self-hosted user to use applications that cannot be run with Cozy for the moment, I suggest we let them write in a file a list of slug=port that would be loaded by the proxy.

E.G. In /usr/local/cozy/custom-routes.txt


psdash=5000
....
...

And so on. That could be a decent workaround before the controller is capable of running apps of other languages.

Use case: I want to be able to monitor my Cozy with psdash which is a Python app. All I have to do is creating a supervisor conf and update the custom route file, then I can use my Cozy to handle it without too much pain.

aenario commented 10 years ago

I think it will be cleaner to have them as documents with Application Doctype and a special status ('not-managed-by-cozy'). The only change needed to make it work would be for cozy-home to handle them properly (ie. not try to start/stop/uninstall them).

jsilvestre commented 10 years ago

I totally agree, I like that idea but we need to find a way to add those documents easily (that's why the file was nice). Maybe the file can be loaded in a "create or update" way by the Proxy, the Home or the DS, that would create the related application documents if needed (cozy-fixtures is not capable of that).

edit: we are probably going to face the same issue that we already face when porting existing apps with absolute URLs for pages and assets...