From bafb902b7885b35bc4ff4e08f5459f4226a250f8 Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 6 Oct 2023 12:31:02 -0400 Subject: [PATCH] build updates --- Dockerfile | 7 ++----- Makefile | 9 ++++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index e06fe084..51b23a72 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 @@ -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 @@ -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 diff --git a/Makefile b/Makefile index c12cc555..05015931 100644 --- a/Makefile +++ b/Makefile @@ -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) \ . @@ -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 $@