Hi, I need to deploy the DataHub frontend so that ...
# all-things-deployment
b
Hi, I need to deploy the DataHub frontend so that it is accessed via a URL with a path prefix rather than residing on the server root (e.g. http://myserver.example.com/datahub instead of http://myserver.example.com/). This is because DataHub will be one of a number of services accessed off the same DNS name, fronted by an Nginx reverse proxy to route to each service. As far as I can tell, I will need to change
datahub-frontend/conf/routes
,
datahub-web-react/src/conf/Global.ts
and
datahub-web-react/.env
to add the path prefix, then rebuild and make a Docker image off that. Is that correct?
b
hmmm this is interesting... in the UI we'd need some way to set a global "base path" configuration which is always pre-pended to any routes... then in the backend we shouldn't need to change anything so long as your nginx routing is setup to chop whatever path is on top of the standard "datahub" prefix
b
For the backend we won't have the problem as we don't intend to allow users to access it directly. For now I've deployed the backend container to the same host as the frontend but if/when we separate it out, it will be on an EC2 instance as part of an autoscaling group behind its own load balancer with security group rules set up to restrict access, so there won't be any additional path prefix in our case. For the frontend though we do need to have the path prefix - ideally that would be something that could be passed as config but we have to build our own frontend image anyway to use own own theme, so I can make the code changes to use our custom path prefix.
m
@big-carpet-38439 Has anything changed on this in the last 3 months? I’m using a similar setup to Ed and can follow his instructions, but would be nice if there was a single ‘base path’ to config somewhere
@bland-wolf-37286 can you confirm if the changes you suggest above worked?
b
We do not support path prefix yet, to my knowledge. I think it'd be really useful but unfortunately it hasn't come up enough to warrant deep investment 😞 That being said, we are happy to advise on this
c
Doesn't look like a feature request exists for it. I'll make one.
v
I would second a path prefix
s
@big-carpet-38439 I would like to know more as to why this path prefix change would require 'deep investment' (time/resources)? We are checking, if we could reconfigure some of the Play or React path settings and rebuild DataHub and hopefully that should work. I want to make sure we are not being too optimistic here and underestimating the effort required to solve this. Any pointers would be appreciated!
m
Hi @bland-wolf-37286, Did you complete change prefix of datahub sir?