Skip to content

Commit

Permalink
Add: Docker entrypoint to do Celery healthchecks. (#3548)
Browse files Browse the repository at this point in the history
  • Loading branch information
arikfr authored Mar 7, 2019
1 parent dfa48ca commit 8737e80
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/docker-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ create_db() {
exec /app/manage.py database create_tables
}

celery_healthcheck() {
exec /usr/local/bin/celery inspect ping --app=redash.worker -d celery@$HOSTNAME
}

help() {
echo "Redash Docker."
echo ""
Expand All @@ -36,6 +40,7 @@ help() {
echo "server -- start Redash server (with gunicorn)"
echo "worker -- start Celery worker"
echo "scheduler -- start Celery worker with a beat (scheduler) process"
echo "celery_healthcheck -- runs a Celery healthcheck. Useful for Docker's HEALTHCHECK mechanism."
echo ""
echo "shell -- open shell"
echo "dev_server -- start Flask development server with debugger and auto reload"
Expand Down

0 comments on commit 8737e80

Please sign in to comment.