2019-12-18 18:57:18 -08:00
|
|
|
# DataHub Frontend Docker Image
|
2020-06-01 09:36:51 -07:00
|
|
|
[](https://github.com/linkedin/datahub/actions?query=workflow%3A%22datahub-frontend+docker%22)
|
2019-09-08 20:25:58 -07:00
|
|
|
|
2019-12-18 18:57:18 -08:00
|
|
|
Refer to [DataHub Frontend Service](../../datahub-frontend) to have a quick understanding of the architecture and
|
|
|
|
responsibility of this service for the DataHub.
|
2019-09-08 20:25:58 -07:00
|
|
|
|
2020-06-08 13:37:14 -07:00
|
|
|
## Build & Run
|
2019-09-08 20:25:58 -07:00
|
|
|
```
|
2020-06-08 13:37:14 -07:00
|
|
|
cd docker/frontend && docker-compose up --build
|
2019-09-08 20:25:58 -07:00
|
|
|
```
|
2020-06-08 13:37:14 -07:00
|
|
|
This command will rebuild the docker image and start a container based on the image.
|
2019-09-08 20:25:58 -07:00
|
|
|
|
2020-06-08 13:37:14 -07:00
|
|
|
To start a container using an existing image, run the same command without the `--build` flag.
|
2019-09-08 20:25:58 -07:00
|
|
|
|
|
|
|
### Container configuration
|
|
|
|
#### External Port
|
|
|
|
If you need to configure default configurations for your container such as the exposed port, you will do that in
|
|
|
|
`docker-compose.yml` file. Refer to this [link](https://docs.docker.com/compose/compose-file/#ports) to understand
|
|
|
|
how to change your exposed port settings.
|
|
|
|
```
|
|
|
|
ports:
|
|
|
|
- "9001:9001"
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Docker Network
|
2019-12-18 18:57:18 -08:00
|
|
|
All Docker containers for DataHub are supposed to be on the same Docker network which is `datahub_network`.
|
2019-09-08 20:25:58 -07:00
|
|
|
If you change this, you will need to change this for all other Docker containers as well.
|
|
|
|
```
|
|
|
|
networks:
|
|
|
|
default:
|
|
|
|
name: datahub_network
|
|
|
|
```
|
|
|
|
|
|
|
|
#### datahub-gms Container
|
|
|
|
Before starting `datahub-frontend` container, `datahub-gms` container should already be up and running.
|
|
|
|
`datahub-frontend` service creates a connection to `datahub-gms` service and this is configured with environment
|
|
|
|
variables in `docker-compose.yml`:
|
|
|
|
```
|
|
|
|
environment:
|
|
|
|
- DATAHUB_GMS_HOST=datahub-gms
|
|
|
|
- DATAHUB_GMS_PORT=8080
|
|
|
|
```
|
|
|
|
The value of `DATAHUB_GMS_HOST` variable should be set to the host name of the `datahub-gms` container within the Docker network.
|
|
|
|
|
2019-12-18 18:57:18 -08:00
|
|
|
## Checking out DataHub UI
|
2019-09-08 20:25:58 -07:00
|
|
|
After starting your Docker container, you can connect to it by typing below into your favorite web browser:
|
|
|
|
```
|
|
|
|
http://localhost:9001
|
|
|
|
```
|
2020-01-10 15:28:09 -06:00
|
|
|
You can sign in with `datahub` as username and password.
|