You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by cr...@apache.org on 2020/03/24 17:24:40 UTC
[incubator-superset] branch master updated: Adding
requirements-local.txt support (#9357)
This is an automated email from the ASF dual-hosted git repository.
craigrueda pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new 06e0f04 Adding requirements-local.txt support (#9357)
06e0f04 is described below
commit 06e0f04214bd7866328c6714687eaeffafc44f70
Author: Craig Rueda <cr...@craigrueda.com>
AuthorDate: Tue Mar 24 10:24:23 2020 -0700
Adding requirements-local.txt support (#9357)
* Adding requirements-local.txt support
* Reverting package-lock.json
---
.gitignore | 2 ++
Dockerfile | 5 +++--
docker/README.md | 12 ++++++++++++
3 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index d069eef..0ccddfa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -80,3 +80,5 @@ apache-superset-*.tar.gz*
# Translation binaries
messages.mo
+
+docker/requirements-local.txt
diff --git a/Dockerfile b/Dockerfile
index 9f14b07..a10fcfe 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -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
diff --git a/docker/README.md b/docker/README.md
index 62a97aa..caed1a7 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -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)