Closed kabachello closed 1 month ago
I have the same trouble
Hi @kabachello, thanks for your feedback! Yes, currently this is not possible. Could you please tell me what is the reason you want to have this?
If you want to have other webapps on the same port and have schemio in the /schemio
prefix I would suggest to put it behind an nginx, HAProxy or any other load balancer. Something like this in nginx should do the trick:
upstream schemio {
server localhost:4010;
}
server {
location /schemio {
proxy_pass http://schemio;
}
}
@MimikFc7 also could you please describe your use case?
Hi @kabachello, thanks for your feedback! Yes, currently this is not possible. Could you please tell me what is the reason you want to have this? If you want to have other webapps on the same port and have schemio in the
/schemio
prefix I would suggest to put it behind an nginx, HAProxy or any other load balancer. Something like this in nginx should do the trick:upstream schemio { server localhost:4010; } server { location /schemio { proxy_pass http://schemio; } }
@MimikFc7 also could you please describe your use case?
Hello, this is not working because schemio has link to other folders like as "assets" and this links started with /assets and when we use proxy_pass, then all assets does not load, and in my server have some other projects and folder assets busy
@MimikFc7 ah, you are right! I see the problem now. Will try to address it soon
@kabachello @MimikFc7 I have finally implemented custom route prefix in Schemio and release the new version 0.18.2
It works by specifying the ROUTE_PREFIX
env variable.
e.g.
docker run -v "$(pwd):/opt/schemio" -p 4010:4010 -e FS_ROOT_PATH=/opt/schemio -e ROUTE_PREFIX=/schemio -e SERVER_PORT=4010 binshu/schemio:latest
Also documented this option here https://github.com/ishubin/schemio?tab=readme-ov-file#configuration-of-server-based-version-of-schemio
Please let me know if it works or if there are any issues with it. It took a while as I had to implement the propagation of the route prefix from the server to every part of the frontend that references any resources, so I could have missed something.
@ishubin , thank you very much for the update! Works for me perfectly!
First of all, thank you for this impressive work!
I was easily able to run the app with local file storage. However, I would like to place it in a subfolder of my server. So instead
http://localhost/
I would like it to be accessible viahttp://localhost/schemio/
.I see, it is pretty easy to modify the
assetsPath
and therootPath
, but I was unable to find a way to prefix the API calls with a subfolder: e.g. Instead of/v1/fs
I needschemio/v1/fs
? Is there a way to do this somehow?