diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dd91f3ee..b378b95b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,6 +12,8 @@ this project follows the following guidelines. **Content:** - [Changelog](#changelog) +- [Work With Superset Upstream](#work-with-superset-upstream) +- [Build Docker Image](#build-docker-image) - [Run source{d} CE For Development With Hot Reloading](#run-source-d-ce-for-development-with-hot-reloading) @@ -24,6 +26,42 @@ If you open a PR, you should also add a brief summary in the `CHANGELOG.md` mentioning the new feature, change or bugfix that you proposed. +## Work With Superset Upstream + +Superset version which we are based on is defined in `Makefile`. + +To see which files are patched compare to upstream, run: + +```shell +$ make diff-stat +``` + +To see diff with upstream, run: + +```shell +$ make diff +``` + + +## Build Docker Image + +The official Docker images of sourced-ui, used by **source{d} CE** are released at +[hub.docker.com/r/srcd/sourced-ui](https://hub.docker.com/r/srcd/sourced-ui). You +can also build yours running: + +```shell +$ make build +``` + +The docker image name and tag are defined by the [`Makefile`](Makefile) and can +be overridden passing environment variables to the `build` target, example: + +```shell +$ DOCKER_IMAGE_NAME=my/sourced-ui VERSION=local make build +``` + +will locally build an image called `my/sourced-ui:local` + ## Run source{d} CE For Development With Hot Reloading Running **source{d} CE** in development mode will enable hot reloading at diff --git a/README.md b/README.md index e697793c..6ded4548 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,6 @@ Web UI for [source{d} Community Edition (CE)](https://github.com/src-d/sourced-ce). -## Contents - -- [Description](#description) -- [Development](#development) ## Description @@ -22,6 +18,7 @@ This repository contains the code for the [`srcd/sourced-ui`](https://hub.docker ### Environment Variables + You can configure the Docker image using the following environment variables: | Environment Variable | Description | @@ -54,52 +51,6 @@ You can configure the Docker image using the following environment variables: | `METADATA_PASSWORD` | Password for metadata DB (when `SYNC_MODE` is set to `true`) | | `METADATA_DB` | Database name for metadata (when `SYNC_MODE` is set to `true`) | -## Development - -### Setup local environment - -Download the `docker-compose.yml` file from [`src-d/sourced-ce`](https://github.com/src-d/sourced-ce), and run the dependencies: -``` -docker-compose up gitbase bblfsh-web -``` - -Update superset directory: - -``` -make patch-dev -``` - -Enter into `superset` directory: -``` -cd superset -``` - -Follow original superset instructions for [Flask server](https://github.com/apache/incubator-superset/blob/release--0.32/CONTRIBUTING.md#flask-server) and [Frontend assets](https://github.com/apache/incubator-superset/blob/release--0.32/CONTRIBUTING.md#frontend-assets) - - -### Build docker image - -``` -make build -``` - -The image name is defined in the `Makefile`. - -### Work with superset upstream - -Superset version which we are based on is defined in `Makefile`. - -To see which files are patched compare to upstream, run: - -``` -make diff-stat -``` - -To see diff with upstream, run: - -``` -make diff -``` ## Contribute