Skip to content
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
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ ui
ami/media
backups
venv
.venv
.env
.envs
.envs/*
node_modules
data
2 changes: 1 addition & 1 deletion compose/local/django/celery/flower/start
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ set -o nounset

exec watchfiles --filter python celery.__main__.main \
--args \
"-A config.celery_app -b \"${CELERY_BROKER_URL}\" flower --basic_auth=\"${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}\""
"-A config.celery_app -b \"${CELERY_BROKER_URL}\" flower --db=\"${CELERY_FLOWER_DB-/data/flower.db}\""
1 change: 1 addition & 0 deletions compose/production/django/celery/flower/start
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ exec celery \
-b "${CELERY_BROKER_URL}" \
flower \
--basic_auth="${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}"
--db="${CELERY_FLOWER_DB:-/data/flower.db}"
3 changes: 1 addition & 2 deletions compose/production/django/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ set -o pipefail
set -o nounset



# N.B. If only .env files supported variable expansion...
export CELERY_BROKER_URL="${REDIS_URL}"
export CELERY_BROKER_URL="${CELERY_BROKER_URL:-$REDIS_URL}"


if [ -z "${POSTGRES_USER}" ]; then
Expand Down
4 changes: 3 additions & 1 deletion config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#std:setting-broker_url
CELERY_BROKER_URL = env("CELERY_BROKER_URL")
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#std:setting-result_backend
CELERY_RESULT_BACKEND = CELERY_BROKER_URL
CELERY_RESULT_BACKEND = env("CELERY_RESULT_BACKEND", default=env("REDIS_URL", default=None))
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#result-extended
CELERY_RESULT_EXTENDED = True
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#result-backend-always-retry
Expand All @@ -315,6 +315,8 @@
CELERY_TASK_SERIALIZER = "json"
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#std:setting-result_serializer
CELERY_RESULT_SERIALIZER = "json"
CELERY_TASK_COMPRESSION = "gzip"
CELERY_RESULT_COMPRESSION = "gzip"
# https://docs.celeryq.dev/en/stable/userguide/configuration.html#task-time-limit
# TODO: set to whatever value is adequate in your circumstances
CELERY_TASK_TIME_LIMIT = 7 * 60 * 24
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ services:
- "5550:5555"
command: /start-flower
restart: always
volumes:
- ./data/flower/:/data/

awscli:
build:
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ services:
ports:
- "5555:5555"
command: /start-flower
volumes:
- ./data/flower/:/data/

minio:
image: minio/minio:latest
Expand Down