chore: removing redundant docker-entrypoint (#17687)
* chore: removing redundant docker-entrypoint * chore: chmod the run-server * Update Dockerfile Co-authored-by: Amit Miran <47772523+amitmiran137@users.noreply.github.com>
This commit is contained in:
parent
8c25f2f356
commit
aee5c9a3ea
|
|
@ -106,7 +106,9 @@ RUN cd /app \
|
|||
&& chown -R superset:superset * \
|
||||
&& pip install -e .
|
||||
|
||||
COPY ./docker/docker-entrypoint.sh /usr/bin/
|
||||
COPY ./docker/run-server.sh /usr/bin/
|
||||
|
||||
RUN chmod a+x /usr/bin/run-server.sh
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
|
@ -116,7 +118,7 @@ HEALTHCHECK CMD curl -f "http://localhost:$SUPERSET_PORT/health"
|
|||
|
||||
EXPOSE ${SUPERSET_PORT}
|
||||
|
||||
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
|
||||
CMD /usr/bin/run-server.sh
|
||||
|
||||
######################################################################
|
||||
# Dev image...
|
||||
|
|
|
|||
|
|
@ -47,5 +47,5 @@ elif [[ "${1}" == "app" ]]; then
|
|||
flask run -p 8088 --with-threads --reload --debugger --host=0.0.0.0
|
||||
elif [[ "${1}" == "app-gunicorn" ]]; then
|
||||
echo "Starting web app..."
|
||||
/app/docker/docker-entrypoint.sh
|
||||
/usr/bin/run-server.sh
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -20,16 +20,7 @@
|
|||
# TODO: copy config overrides from ENV vars
|
||||
|
||||
# TODO: run celery in detached state
|
||||
|
||||
export SERVER_THREADS_AMOUNT=8
|
||||
# start up the web server
|
||||
gunicorn \
|
||||
--bind "0.0.0.0:${SUPERSET_PORT}" \
|
||||
--access-logfile '-' \
|
||||
--error-logfile '-' \
|
||||
--workers 1 \
|
||||
--worker-class gthread \
|
||||
--threads 8 \
|
||||
--timeout 60 \
|
||||
--limit-request-line 0 \
|
||||
--limit-request-field_size 0 \
|
||||
"${FLASK_APP}"
|
||||
|
||||
/usr/bin/run-server.sh
|
||||
|
|
|
|||
|
|
@ -1,34 +0,0 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
set -eo pipefail
|
||||
|
||||
if [ "${#}" -ne 0 ]; then
|
||||
exec "${@}"
|
||||
else
|
||||
gunicorn \
|
||||
--bind "0.0.0.0:${SUPERSET_PORT}" \
|
||||
--access-logfile '-' \
|
||||
--error-logfile '-' \
|
||||
--workers 1 \
|
||||
--worker-class gthread \
|
||||
--threads 20 \
|
||||
--timeout ${GUNICORN_TIMEOUT:-60} \
|
||||
--limit-request-line 0 \
|
||||
--limit-request-field_size 0 \
|
||||
"${FLASK_APP}"
|
||||
fi
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
HYPHEN_SYMBOL='-'
|
||||
|
||||
gunicorn \
|
||||
--bind "${SUPERSET_BIND_ADDRESS:-0.0.0.0}:${SUPERSET_PORT:-8088}" \
|
||||
--access-logfile "${ACCESS_LOG_FILE:-$HYPHEN_SYMBOL}" \
|
||||
--error-logfile "${ERROR_LOG_FILE:-$HYPHEN_SYMBOL}" \
|
||||
--workers ${SERVER_WORKER_AMOUNT:-1} \
|
||||
--worker-class ${SERVER_WORKER_CLASS:-gthread} \
|
||||
--threads ${SERVER_THREADS_AMOUNT:-20} \
|
||||
--timeout ${GUNICORN_TIMEOUT:-60} \
|
||||
--limit-request-line ${SERVER_LIMIT_REQUEST_LINE:-0} \
|
||||
--limit-request-field_size ${SERVER_LIMIT_REQUEST_FIELD_SIZE:-0} \
|
||||
"${FLASK_APP}"
|
||||
|
|
@ -22,7 +22,7 @@ maintainers:
|
|||
- name: craig-rueda
|
||||
email: craig@craigrueda.com
|
||||
url: https://github.com/craig-rueda
|
||||
version: 0.4.0
|
||||
version: 0.5.0
|
||||
dependencies:
|
||||
- name: postgresql
|
||||
version: 10.2.0
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ supersetNode:
|
|||
command:
|
||||
- "/bin/sh"
|
||||
- "-c"
|
||||
- ". {{ .Values.configMountPath }}/superset_bootstrap.sh; /usr/bin/docker-entrypoint.sh"
|
||||
- ". {{ .Values.configMountPath }}/superset_bootstrap.sh; /usr/bin/run-server.sh"
|
||||
connections:
|
||||
redis_host: '{{ template "superset.fullname" . }}-redis-headless'
|
||||
redis_port: "6379"
|
||||
|
|
|
|||
Loading…
Reference in New Issue