[GitHub] [incubator-superset] dpgaspar commented on a change in pull request #8725: Docker support

2019-12-03 Thread GitBox
dpgaspar commented on a change in pull request #8725: Docker support
URL: 
https://github.com/apache/incubator-superset/pull/8725#discussion_r353059444
 
 

 ##
 File path: docker/pythonpath_dev/superset_config.py
 ##
 @@ -14,9 +14,21 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
+
+#
+# This file is included in the final Docker image and SHOULD be overridden when
+# deploying the image to prod. Settings configured here are intended for use 
in local
+# development environments. Also note that superset_config_docker.py is 
imported
+# as a final step as a means to override "defaults" configured here
+#
+
+import logging
 import os
 
 
+logger = logging.getLogger()
+
 
 Review comment:
   nit: Can you change single quotes to double quotes on this file


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



[GitHub] [incubator-superset] dpgaspar commented on a change in pull request #8725: Docker support

2019-12-03 Thread GitBox
dpgaspar commented on a change in pull request #8725: Docker support
URL: 
https://github.com/apache/incubator-superset/pull/8725#discussion_r353062947
 
 

 ##
 File path: docker/pythonpath_dev/superset_config_local.example
 ##
 @@ -0,0 +1,27 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#
+# This is an example "local" configuration file. In order to set/override 
config
+# options that ONLY apply to your local environment, simply copy/rename this 
file
+# to docker/pythonpath/superset_config_docker.py
+# It ends up being imported by docker/superset_config.py which is loaded by
+# superset/config.py
+#
+
+SQLALCHEMY_DATABASE_URI = 
'postgresql+psycopg2://pguser:pg...@some.host/superset'
 
 Review comment:
   nit: double quotes


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



[GitHub] [incubator-superset] dpgaspar commented on a change in pull request #8725: Docker support

2019-12-03 Thread GitBox
dpgaspar commented on a change in pull request #8725: Docker support
URL: 
https://github.com/apache/incubator-superset/pull/8725#discussion_r353060153
 
 

 ##
 File path: docker/docker-entrypoint.sh
 ##
 @@ -15,24 +15,15 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-set -ex
+set -eo pipefail
 
-if [ "$#" -ne 0 ]; then
-exec "$@"
-elif [ "$SUPERSET_ENV" = "development" ]; then
-celery worker --app=superset.sql_lab:celery_app --pool=gevent -Ofair &
-# needed by superset runserver
-(cd superset/assets/ && npm ci)
-(cd superset/assets/ && npm run dev) &
-FLASK_ENV=development FLASK_APP="superset.app:create_app()" flask run -p 
8088 --with-threads --reload --debugger --host=0.0.0.0
-elif [ "$SUPERSET_ENV" = "production" ]; then
-celery worker --app=superset.sql_lab:celery_app --pool=gevent -Ofair &
-exec gunicorn --bind  0.0.0.0:8088 \
---workers $((2 * $(getconf _NPROCESSORS_ONLN) + 1)) \
+if [ "${#}" -ne 0 ]; then
+exec "${@}"
+else
+gunicorn --bind  "0.0.0.0:${SUPERSET_PORT}" \
+--workers 1 \
 --timeout 60 \
 --limit-request-line 0 \
 --limit-request-field_size 0 \
 "superset.app:create_app()"
 
 Review comment:
   Replace `superset.app:create_app()` by `${FLASK_APP}`


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org



[GitHub] [incubator-superset] dpgaspar commented on a change in pull request #8725: Docker support

2019-12-03 Thread GitBox
dpgaspar commented on a change in pull request #8725: Docker support
URL: 
https://github.com/apache/incubator-superset/pull/8725#discussion_r353067104
 
 

 ##
 File path: Dockerfile
 ##
 @@ -0,0 +1,87 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+ARG PY_VER=3.6.9
+FROM python:${PY_VER} AS superset-py
+
+RUN mkdir /app \
+&& apt-get update -y \
+&& apt-get install -y --no-install-recommends \
+build-essential \
+default-libmysqlclient-dev \
+libpq-dev \
+&& rm -rf /var/lib/apt/lists/*
+
+COPY requirements* ./setup.py ./MANIFEST.in ./README.md ./app/
+COPY superset /app/superset
+
+RUN cd /app \
+&& pip install --upgrade setuptools pip \
+&& pip install -r requirements.txt -r requirements-dev.txt \
 
 Review comment:
   I understand the need, but I really don't like this `requirements-dev` here, 
contains lot's of things that are not needed and his changed by contributions 
taking into context a development environment not an official docker build. We 
could use a `requirements-extra` for this.


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org