Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: removing redundant docker-entrypoint #17687

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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...
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having trouble starting docker composer due to this fix:

/app/docker/docker-bootstrap.sh: line 50: /usr/bin/run-server.sh: No such file or directory

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try running docker-compose pull first

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

macOS
/usr/bin/run-server.sh -> sh /app/docker/run-server.sh

fi
15 changes: 3 additions & 12 deletions docker/docker-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
34 changes: 0 additions & 34 deletions docker/docker-entrypoint.sh

This file was deleted.

32 changes: 32 additions & 0 deletions docker/run-server.sh
Original file line number Diff line number Diff line change
@@ -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}"
2 changes: 1 addition & 1 deletion helm/superset/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ maintainers:
- name: craig-rueda
email: [email protected]
url: https://github.com/craig-rueda
version: 0.4.0
version: 0.5.0
dependencies:
- name: postgresql
version: 10.2.0
Expand Down
2 changes: 1 addition & 1 deletion helm/superset/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down