cozy-proxy
cozy-proxy copied to clipboard
Adding a custom routes file
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.
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).
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...