Celery worker for FastAPI RBAC project.
2.4K
This Docker image contains the Celery worker service for the FastAPI RBAC (Role-Based Access Control) project. It handles background tasks such as sending emails, processing long-running operations, and executing scheduled tasks.
Project Source Code: https://github.com/mnaimfaizy/fastapi_rbac
latest: The latest build from the main branch.vX.Y.Z (e.g., v1.0.0): Stable release versions.vX.Y.Z-beta.N (e.g., v0.1.0-beta.1): Pre-release versions.Refer to the GitHub repository tags for a full list of available version tags.
# Example:
docker run -d \
--name rbac_worker \
# Ensure the worker can connect to the same database and Redis instance as the backend
-e DATABASE_USER=your_db_user \
-e DATABASE_PASSWORD=your_db_password \
-e DATABASE_HOST=your_db_host \
-e DATABASE_PORT=5432 \
-e DATABASE_NAME=your_db_name \
-e REDIS_HOST=your_redis_host \
-e REDIS_PORT=6379 \
-e REDIS_PASSWORD=your_redis_password \
-e CELERY_BROKER_URL=redis://your_redis_host:6379/0 \ # Or use REDIS_HOST, REDIS_PORT, REDIS_PASSWORD to construct this
-e CELERY_RESULT_BACKEND=redis://your_redis_host:6379/0 \
# Add other necessary environment variables as per backend/.env.example
# (especially those related to email if your tasks send emails)
mnaimfaizy/fastapi-rbac-worker:latest # Or a specific version tag like :v1.0.0
The Celery worker shares many environment variables with the backend service, especially for database and Redis connections, and any application settings that tasks might need. Refer to backend/.env.example in the source repository for the complete list of environment variables. The file contains both development and production configurations with clear guidance for each environment.
Key variables for the worker:
DATABASE_USER, DATABASE_PASSWORD, DATABASE_HOST, DATABASE_PORT, DATABASE_NAMEREDIS_HOST, REDIS_PORT, REDIS_PASSWORDCELERY_BROKER_URL (e.g., redis://localhost:6379/0) - Can often be constructed from REDIS_HOST, etc.CELERY_RESULT_BACKEND (e.g., redis://localhost:6379/0)EMAILS_ENABLEDSMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASSWORD, SMTP_TLSEMAILS_FROM_EMAIL, EMAILS_FROM_NAMEThe Celery worker itself does not typically expose ports for direct external access. If you run Flower (a Celery monitoring tool), it would expose its own port (e.g., 5555), but the base worker image does not.
For more detailed information on the project setup, background tasks, and architecture, please refer to the main README.md and other documentation in the source code repository.
Content type
Image
Digest
sha256:76e1e51c1…
Size
260.6 MB
Last updated
3 months ago
docker pull mnaimfaizy/fastapi-rbac-worker