diff --git a/README.md b/README.md index a4c85cd..3c0b6e4 100644 --- a/README.md +++ b/README.md @@ -285,6 +285,7 @@ A collection of delicious docker recipes. - [ ] hub - [ ] node-firefox - [x] standalone-firefox +- [x] amancevice/superset - [x] v2ray/official :cn: - [x] centurylink/watchtower - [x] wekanteam/wekan diff --git a/superset/Dockerfile b/superset/Dockerfile new file mode 100644 index 0000000..62ed680 --- /dev/null +++ b/superset/Dockerfile @@ -0,0 +1,75 @@ +# +# Dockerfile for superset-arm +# + +FROM resin/rpi-raspbian:stretch +MAINTAINER EasyPi Software Foundation + +# Superset version +ARG SUPERSET_VERSION=0.26.3 + +# Configure environment +ENV LANG=C.UTF-8 \ + LC_ALL=C.UTF-8 \ + PYTHONPATH=/etc/superset:/home/superset:$PYTHONPATH \ + SUPERSET_REPO=apache/incubator-superset \ + SUPERSET_VERSION=${SUPERSET_VERSION} \ + SUPERSET_HOME=/var/lib/superset + +# Create superset user & install dependencies +RUN useradd -U -m superset && \ + mkdir /etc/superset && \ + mkdir ${SUPERSET_HOME} && \ + chown -R superset:superset /etc/superset && \ + chown -R superset:superset ${SUPERSET_HOME} && \ + apt-get update && \ + apt-get install -y \ + build-essential \ + curl \ + default-libmysqlclient-dev \ + freetds-dev \ + freetds-bin \ + libffi-dev \ + libldap2-dev \ + libpq-dev \ + libsasl2-dev \ + libssl-dev \ + python3-dev && \ + apt-get clean && \ + rm -r /var/lib/apt/lists/* && \ + curl https://raw.githubusercontent.com/${SUPERSET_REPO}/${SUPERSET_VERSION}/requirements.txt -o requirements.txt && \ + curl -sSL https://bootstrap.pypa.io/get-pip.py | python3 && \ + pip3 install --no-cache-dir -r requirements.txt && \ + pip3 install --no-cache-dir \ + Werkzeug==0.12.1 \ + flask-cors==3.0.3 \ + flask-mail==0.9.1 \ + flask-oauth==0.12 \ + flask_oauthlib==0.9.3 \ + gevent==1.2.2 \ + impyla==0.14.0 \ + infi.clickhouse-orm==0.9.8 \ + mysqlclient==1.3.7 \ + psycopg2==2.6.1 \ + pyathena==1.2.5 \ + pyhive==0.5.1 \ + pyldap==2.4.28 \ + pymssql==2.1.3 \ + redis==2.10.5 \ + sqlalchemy-clickhouse==0.1.3.post0 \ + sqlalchemy-redshift==0.5.0 \ + superset==${SUPERSET_VERSION} && \ + rm requirements.txt + +# Configure Filesystem +COPY superset /usr/local/bin +VOLUME /home/superset \ + /etc/superset \ + /var/lib/superset +WORKDIR /home/superset + +# Deploy application +EXPOSE 8088 +HEALTHCHECK CMD ["curl", "-f", "http://localhost:8088/health"] +CMD ["gunicorn", "-w", "2", "--timeout", "60", "-b", "0.0.0.0:8088", "--limit-request-line", "0", "--limit-request-field_size", "0", "superset:app"] +USER superset diff --git a/superset/README.md b/superset/README.md new file mode 100644 index 0000000..150d179 --- /dev/null +++ b/superset/README.md @@ -0,0 +1,2 @@ +superset +======== diff --git a/superset/arm/Dockerfile b/superset/arm/Dockerfile new file mode 100644 index 0000000..5da51bb --- /dev/null +++ b/superset/arm/Dockerfile @@ -0,0 +1,75 @@ +# +# Dockerfile for superset-arm +# + +FROM resin/rpi-raspbian:stretch +MAINTAINER EasyPi Software Foundation + +# Superset version +ARG SUPERSET_VERSION=0.26.3 + +# Configure environment +ENV LANG=C.UTF-8 \ + LC_ALL=C.UTF-8 \ + PYTHONPATH=/etc/superset:/home/superset:$PYTHONPATH \ + SUPERSET_REPO=apache/incubator-superset \ + SUPERSET_VERSION=${SUPERSET_VERSION} \ + SUPERSET_HOME=/var/lib/superset + +# Create superset user & install dependencies +RUN useradd -U -m superset && \ + mkdir /etc/superset && \ + mkdir ${SUPERSET_HOME} && \ + chown -R superset:superset /etc/superset && \ + chown -R superset:superset ${SUPERSET_HOME} && \ + apt-get update && \ + apt-get install -y \ + build-essential \ + curl \ + default-libmysqlclient-dev \ + freetds-dev \ + freetds-bin \ + libffi-dev \ + libldap2-dev \ + libpq-dev \ + libsasl2-dev \ + libssl-dev \ + python3-dev \ + python3-pip && \ + apt-get clean && \ + rm -r /var/lib/apt/lists/* && \ + curl https://raw.githubusercontent.com/${SUPERSET_REPO}/${SUPERSET_VERSION}/requirements.txt -o requirements.txt && \ + pip3 install --no-cache-dir -r requirements.txt && \ + pip3 install --no-cache-dir \ + Werkzeug==0.12.1 \ + flask-cors==3.0.3 \ + flask-mail==0.9.1 \ + flask-oauth==0.12 \ + flask_oauthlib==0.9.3 \ + gevent==1.2.2 \ + impyla==0.14.0 \ + infi.clickhouse-orm==0.9.8 \ + mysqlclient==1.3.7 \ + psycopg2==2.6.1 \ + pyathena==1.2.5 \ + pyhive==0.5.1 \ + pyldap==2.4.28 \ + pymssql==2.1.3 \ + redis==2.10.5 \ + sqlalchemy-clickhouse==0.1.3.post0 \ + sqlalchemy-redshift==0.5.0 \ + superset==${SUPERSET_VERSION} && \ + rm requirements.txt + +# Configure Filesystem +COPY superset /usr/local/bin +VOLUME /home/superset \ + /etc/superset \ + /var/lib/superset +WORKDIR /home/superset + +# Deploy application +EXPOSE 8088 +HEALTHCHECK CMD ["curl", "-f", "http://localhost:8088/health"] +CMD ["gunicorn", "-w", "2", "--timeout", "60", "-b", "0.0.0.0:8088", "--limit-request-line", "0", "--limit-request-field_size", "0", "superset:app"] +USER superset diff --git a/superset/arm/superset/superset-demo b/superset/arm/superset/superset-demo new file mode 100755 index 0000000..151531f --- /dev/null +++ b/superset/arm/superset/superset-demo @@ -0,0 +1,7 @@ +#!/bin/bash + +# Initialize Superset +superset-init + +# Load some data to play with +superset load_examples diff --git a/superset/arm/superset/superset-init b/superset/arm/superset/superset-init new file mode 100755 index 0000000..bf3d0b0 --- /dev/null +++ b/superset/arm/superset/superset-init @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +# Create an admin user +fabmanager create-admin --app superset $@ + +# Initialize the database +superset db upgrade + +# Create default roles and permissions +superset init diff --git a/superset/docker-compose.yml b/superset/docker-compose.yml new file mode 100644 index 0000000..1c75d39 --- /dev/null +++ b/superset/docker-compose.yml @@ -0,0 +1,7 @@ +superset: + image: amancevice/superset + ports: + - "8088:8088" + volumes: + - ./data:/var/lib/superset + restart: always