datahub/docker/frontend/README.md

56 lines
2.1 KiB
Markdown
Raw Normal View History

2019-12-18 18:57:18 -08:00
# DataHub Frontend Docker Image
2019-09-08 20:25:58 -07:00
[![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/keremsahin/datahub-frontend)](https://cloud.docker.com/repository/docker/keremsahin/datahub-frontend/)
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
## Build
```
2019-09-09 01:45:49 -07:00
docker image build -t keremsahin/datahub-frontend -f docker/frontend/Dockerfile .
2019-09-08 20:25:58 -07:00
```
This command will build and deploy the image in your local store.
## Run container
```
cd docker/frontend && docker-compose pull && docker-compose up
2019-09-08 20:25:58 -07:00
```
This command will start the container. If you have the image available in your local store, this image will be used
for the container otherwise it will download the `latest` image from Docker Hub and then start that.
### 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.