Skip to content

Commit

Permalink
build updates
Browse files Browse the repository at this point in the history
  • Loading branch information
amancevice committed Oct 6, 2023
1 parent 74b0fa4 commit bafb902
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ FROM python:$PYTHON_VERSION
# Configure environment
# superset recommended defaults: https://superset.apache.org/docs/installation/configuring-superset#running-on-a-wsgi-http-server
# gunicorn recommended defaults: https://docs.gunicorn.org/en/0.17.2/configure.html#security
ARG SUPERSET_VERSION=2.0.1
ENV FLASK_APP=superset
ENV GUNICORN_BIND=0.0.0.0:8088
ENV GUNICORN_LIMIT_REQUEST_FIELD_SIZE=8190
Expand All @@ -18,9 +17,7 @@ ENV GUNICORN_WORKER_CLASS=gevent
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
ENV PYTHONPATH=/etc/superset:/home/superset:$PYTHONPATH
ENV SUPERSET_REPO=apache/superset
ENV SUPERSET_HOME=/var/lib/superset
ENV SUPERSET_VERSION=$SUPERSET_VERSION
ENV GUNICORN_CMD_ARGS="--bind $GUNICORN_BIND --limit-request-field_size $GUNICORN_LIMIT_REQUEST_FIELD_SIZE --limit-request-line $GUNICORN_LIMIT_REQUEST_LINE --threads $GUNICORN_THREADS --timeout $GUNICORN_TIMEOUT --workers $GUNICORN_WORKERS --worker-class $GUNICORN_WORKER_CLASS"

# Create superset user & install dependencies
Expand Down Expand Up @@ -50,9 +47,9 @@ RUN groupadd supergroup && \
libsasl2-modules-gssapi-mit \
libssl-dev && \
apt-get clean && \
pip install -U pip && \
pip install -r requirements.txt && \
pip install -r requirements-dev.txt && \
pip install apache-superset==$SUPERSET_VERSION
pip install -r requirements-dev.txt

# Configure Filesystem
COPY bin /usr/local/bin
Expand Down
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
REPO := amancevice/superset
PYTHON_VERSION := 3.9
SUPERSET_VERSION := 2.1.1
PYTHON_VERSIOn := $(shell grep 'ARG PYTHON_VERSION=' Dockerfile | grep -Eo '[0-9.]+')
SUPERSET_VERSION := $(shell grep apache-superset Pipfile | grep -Eo '[0-9.]+')

build: requirements-dev.txt
docker build \
--build-arg PYTHON_VERSION=$(PYTHON_VERSION) \
--build-arg SUPERSET_VERSION=$(SUPERSET_VERSION) \
--tag $(REPO) \
--tag $(REPO):$(SUPERSET_VERSION) \
.
Expand Down Expand Up @@ -34,8 +32,9 @@ requirements.txt: Pipfile.lock

Pipfile.lock: Pipfile | .venv
pipenv lock
touch .venv

.venv:
rm -rf $@
mkdir -p $@
pipenv --python $(PYTHON_VERSION)
touch $@

0 comments on commit bafb902

Please sign in to comment.