Skip to content

Commit

Permalink
Adding requirements-local.txt support (#9357)
Browse files Browse the repository at this point in the history
* Adding requirements-local.txt support

* Reverting package-lock.json
  • Loading branch information
craig-rueda committed Mar 24, 2020
1 parent ccb22dc commit 06e0f04
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -80,3 +80,5 @@ apache-superset-*.tar.gz*

# Translation binaries
messages.mo

docker/requirements-local.txt
5 changes: 3 additions & 2 deletions Dockerfile
Expand Up @@ -114,9 +114,10 @@ ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
######################################################################
FROM lean AS dev

COPY ./requirements-dev.txt ./docker/requirements-extra.txt /app/
COPY ./requirements-dev.txt ./docker/requirements* /app/

USER root
RUN cd /app \
&& pip install --no-cache -r requirements-dev.txt -r requirements-extra.txt
&& pip install --no-cache -r requirements-dev.txt -r requirements-extra.txt \
&& pip install --no-cache -r requirements-local.txt || true
USER superset
12 changes: 12 additions & 0 deletions docker/README.md
Expand Up @@ -37,6 +37,18 @@ intended for use with local development.
In order to override configuration settings locally, simply make a copy of [./docker/pythonpath/superset_config_local.example](./docker/pythonpath/superset_config_local.example)
into [./docker/pythonpath/superset_config_docker.py](./docker/pythonpath/superset_config_docker.py) (git ignored) and fill in your overrides.

### 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)
and rebuild your docker stack.

Steps:
1. Create ./docker/requirements-local.txt
2. Add your new packages
3. Rebuild docker-compose
a. `docker-compose down -v`
b. `docker-compose up`

## Initializing Database

The DB will initialize itself upon startup via the init container (superset-init)
Expand Down

0 comments on commit 06e0f04

Please sign in to comment.