I’m currently working on deploying the latest Lightning instance on the subpath /openfn using the docker deployment guide. I have set the URL_HOST to my-domain.com/openfn and when the web container starts it does show that the app is accessible at the subpath my-domain.com/openfn. The problem is when I try to access that path I get a 404 error.
Hey @gnnko , typically people host openfn at a subdomain, rather than a subpath:
openfn.my-domain.com <-- this!
my-domain.com/openfn <-- not this!
If that’s not possible, then you should be able to add an environmental variable that controls this, but it will take some doing. If there are others who want to host OpenFn at a subpath, I’m sure they’d be excited to help out!
Here’s a quick article on the basic changes that you’d need to make. At first glance, it looks suitable:
The only difference between what you see there and what you’ll need to do is make some_subdirectory an environment variable (see lib/lightning/config/bootstrap.ex) so that every OpenFn user around the world doesn’t have to host it at your subpath .
And shoot me a note (taylor@openfn.org) if you’d rather pay to have the OpenFn core team do this for you. I need to check, but don’t think there will be much resistance from the product side—it sounds like a cool idea.
Thank you for the prompt reply and the suggested solution. I do not have control over the subdomain, that is why I have to host it on a path. I will try the solution you’ve provided and give feedback here how it goes.