mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-16 08:24:15 +00:00
* chore(Celery): add basic Celery worker with broker only * chore(Celery): saving progress. Not able to schedule tasks * fix(Celery): add celery app for use by django * fix(Celery): register tasks * fix(Docker): add celery workers to docker-compose * chore(Celery): add django-celery-results backend to store results using Django ORM * fix(Celery): get app config the correct way * fix(Docker): start connecting docker Celery workers to Valkey not yet operational * fix(Celery): get celery & django to work in docker-compose * docs(Celery): document how to run Celery in development environment includes changes to support the configuration and deployment of Celery worker and its dependencies, Valkey and Postgres. * fix(GHA): add valkey to CI services * fix(GHA): add valkey to CI services * fix(GHA): add valkey-cli ping to CI services * fix(GHA): use right port for valkey * fix(Views): remove debug task code * test(Celery): start adding celery task tests not yet working! * fix(pyproject): rollback django upgrade * fix(docker): updated docker runtime and env vars based on feedback from #20 * fix(Dockerfile): include dependencies for psutil psutil was introduced by pytest-celery * fix(Backend): PRWLR-4013 fix celery settings structure * fix(Celery): update celery app to work with new settings structure * fix(Views): remove debug task code * fix(Config): remove debug code * fix(Celery): update celery app name when running worker --------- Co-authored-by: Víctor Fernández Poyatos <victor@prowler.com>
32 lines
1015 B
Bash
32 lines
1015 B
Bash
# Django settings
|
|
DJANGO_ALLOWED_HOSTS=localhost,127.0.0.1
|
|
DJANGO_BIND_ADDRESS=0.0.0.0
|
|
DJANGO_PORT=8000
|
|
DJANGO_DEBUG=False
|
|
# select one of [production|devel]
|
|
DJANGO_SETTINGS_MODULE=config.django.[production|devel]
|
|
# select one of [ndjson|human_readable]
|
|
DJANGO_LOGGING_FORMATTER=[ndjson|human_readable]
|
|
# select one of [DEBUG|INFO|WARNING|ERROR|CRITICAL]
|
|
# applies to both Django and Celery Workers
|
|
DJANGO_LOGGING_LEVEL=INFO
|
|
DJANGO_WORKERS=4 # Defaults to the maximum available based on CPU cores if not set.
|
|
DJANGO_CACHE_MAX_AGE=3600
|
|
DJANGO_STALE_WHILE_REVALIDATE=60
|
|
|
|
# PostgreSQL settings
|
|
# If running django and celery on host, use 'localhost', else use 'postgres-db'
|
|
POSTGRES_HOST=[localhost|postgres-db]
|
|
POSTGRES_PORT=5432
|
|
POSTGRES_ADMIN_USER=prowler
|
|
POSTGRES_ADMIN_PASSWORD=S3cret
|
|
POSTGRES_USER=prowler_user
|
|
POSTGRES_PASSWORD=S3cret
|
|
POSTGRES_DB=prowler_db
|
|
|
|
# valkey settings.
|
|
# If running django and celery on host, use localhost, else use 'valkey'
|
|
VALKEY_HOST=[localhost|valkey]
|
|
VALKEY_PORT=6379
|
|
VALKEY_DB=0
|