Title
f

faint-actor-38411

06/10/2020, 6:09 AM
Hi, I want to run Datahub on a basepath. Currently, I'm using the docker-compose file. Is there a way to rebuild the Docker image of frontend or configure it to run on a basepath. I checked this https://github.com/linkedin/datahub/blob/master/docker/frontend/Dockerfile but can't figure out how the static files are being generated and copied to the Docker image.
o

orange-night-91387

06/10/2020, 2:58 PM
In the docker-compose.yml for the frontend build it specifies the build context as "../..", if you want to run the build with the docker-compose file from a different directory than the one specified in the README.md, you'll need to change that build context. Alternatively you can just use the normal docker image build command:
docker image build -t datahub-frontend -f {path/to/datahub}/docker/frontend/Dockerfile {path/to/datahub}
f

faint-actor-38411

06/10/2020, 3:53 PM
My issue is adding basepath to the static files that are served in the frontend image. I can rebuild the image after making changes
I have tried changing the rootURL in datahub-web/packages/data-portal/config/environment.js but it still runs on /
o

orange-night-91387

06/10/2020, 7:37 PM
All the files that are copied to the docker image are copied from the build context path with the COPY command in the Dockerfile which is by default relative to the location of the datahub repo on your disk. By modifying the location in the docker image build command I put above you can add static files from your basepath. Maybe I'm not understanding your question, sorry 😕 I'm not sure about the significance of the environment.js file or the rootURL, I'm not very familiar with Ember
f

faint-actor-38411

06/11/2020, 12:24 PM
I am assuming the files are generated while the docker image is getting built and I need to configure somewhere how they will get generated
Can you tag someone who can help out here?
o

orange-night-91387

06/11/2020, 2:51 PM
Perhaps @bumpy-keyboard-50565 or @steep-airplane-62865 ? Or at least they should be able to direct someone to help you
b

bumpy-keyboard-50565

06/14/2020, 4:23 PM
@faint-actor-38411 any changes you made to https://github.com/linkedin/datahub/tree/master/datahub-web and https://github.com/linkedin/datahub/tree/master/datahub-frontend should be automatically picked up when rebuilding the
datahub-frontend
docker image using https://github.com/linkedin/datahub/blob/master/docker/frontend/docker-compose.yml. Are you saying that it's not what you observed?
f

faint-actor-38411

06/15/2020, 5:17 PM
@bumpy-keyboard-50565 I was finally able to run it on basepath, changes the scss and js files and hardcoded URLs, then built the image.
b

bumpy-keyboard-50565

06/15/2020, 5:19 PM
Awesome. Would you mind to create a PR to improve any gaps in the documentation? Thanks.