mirror of https://github.com/apache/superset.git
docs(docker): update README (#15607)
Fix broken README links Update Grammar Update blurb about Production mode
This commit is contained in:
parent
7ec6bdff7c
commit
0778f4ab28
|
@ -24,58 +24,52 @@ Docker is an easy way to get started with Superset.
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
1. Docker! [link](https://www.docker.com/get-started)
|
1. Docker! [link](https://www.docker.com/get-started)
|
||||||
1. Docker-compose [link](https://docs.docker.com/compose/install/)
|
2. Docker-compose [link](https://docs.docker.com/compose/install/)
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
The `/app/pythonpath` folder is mounted from [./docker/pythonpath_dev](./docker/pythonpath_dev)
|
The `/app/pythonpath` folder is mounted from [`./docker/pythonpath_dev`](./pythonpath_dev)
|
||||||
which contains a base configuration [./docker/pythonpath_dev/superset_config.py](./docker/pythonpath_dev/superset_config.py)
|
which contains a base configuration [`./docker/pythonpath_dev/superset_config.py`](./pythonpath_dev/superset_config.py)
|
||||||
intended for use with local development.
|
intended for use with local development.
|
||||||
|
|
||||||
### Local overrides
|
### Local overrides
|
||||||
|
|
||||||
In order to override configuration settings locally, simply make a copy of [./docker/pythonpath_dev/superset_config_local.example](./docker/pythonpath_dev/superset_config_local.example)
|
In order to override configuration settings locally, simply make a copy of [`./docker/pythonpath_dev/superset_config_local.example`](./pythonpath_dev/superset_config_local.example)
|
||||||
into [./docker/pythonpath_dev/superset_config_docker.py](./docker/pythonpath_dev/superset_config_docker.py) (git ignored) and fill in your overrides.
|
into `./docker/pythonpath_dev/superset_config_docker.py` (git ignored) and fill in your overrides.
|
||||||
|
|
||||||
### Local packages
|
### Local packages
|
||||||
|
|
||||||
If you want to add python packages in order to test things like DBs locally, you can simply add a local requirements.txt (./docker/requirements-local.txt)
|
If you want to add Python packages in order to test things like databases locally, you can simply add a local requirements.txt (`./docker/requirements-local.txt`)
|
||||||
and rebuild your docker stack.
|
and rebuild your Docker stack.
|
||||||
|
|
||||||
Steps:
|
Steps:
|
||||||
1. Create ./docker/requirements-local.txt
|
|
||||||
2. Add your new packages
|
1. Create `./docker/requirements-local.txt`
|
||||||
3. Rebuild docker-compose
|
2. Add your new packages
|
||||||
a. `docker-compose down -v`
|
3. Rebuild docker-compose
|
||||||
b. `docker-compose up`
|
1. `docker-compose down -v`
|
||||||
|
2. `docker-compose up`
|
||||||
|
|
||||||
## Initializing Database
|
## Initializing Database
|
||||||
|
|
||||||
The DB will initialize itself upon startup via the init container (superset-init)
|
The database will initialize itself upon startup via the init container ([`superset-init`](./docker-init.sh)). This may take a minute.
|
||||||
(This may take a minute.)
|
|
||||||
|
|
||||||
## Normal Operation
|
## Normal Operation
|
||||||
|
|
||||||
To run the container, simply run:
|
To run the container, simply run: `docker-compose up`
|
||||||
|
|
||||||
```bash
|
After waiting several minutes for Superset initialization to finish, you can open a browser and view [`http://localhost:8088`](http://localhost:8088)
|
||||||
docker-compose up
|
|
||||||
```
|
|
||||||
|
|
||||||
After several minutes for superset initialization to finish, you can open a browser and view [`http://localhost:8088`](http://localhost:8088)
|
|
||||||
to start your journey.
|
to start your journey.
|
||||||
|
|
||||||
## Developing
|
## Developing
|
||||||
|
|
||||||
While running, the container server will reload on modification of the superset python and javascript source code.
|
While running, the container server will reload on modification of the Superset Python and JavaScript source code.
|
||||||
Don't forget to reload the page to take the new frontend into account though.
|
Don't forget to reload the page to take the new frontend into account though.
|
||||||
|
|
||||||
## Production
|
## Production
|
||||||
|
|
||||||
It is also possible to run Superset in non-development mode: in the `docker-compose.yml` file remove
|
It is possible to run Superset in non-development mode by using [`docker-compose-non-dev.yml`](../docker-compose-non-dev.yml). This file excludes the volumes needed for development and uses [`./docker/.env-non-dev`](./.env-non-dev) which sets the variable `SUPERSET_ENV` to `production`.
|
||||||
the volumes needed for development and change the variable `SUPERSET_ENV` to `production`.
|
|
||||||
|
|
||||||
## Resource Constraints
|
## Resource Constraints
|
||||||
|
|
||||||
If you are attempting to build on a Mac and it exits with 137 you need to increase your docker resources.
|
If you are attempting to build on macOS and it exits with 137 you need to increase your Docker resources. See instructions [here](https://docs.docker.com/docker-for-mac/#advanced) (search for memory)
|
||||||
OSX instructions: https://docs.docker.com/docker-for-mac/#advanced (Search for memory)
|
|
||||||
|
|
Loading…
Reference in New Issue