prerequisites, setup .env file with this default values
RABBITMQ_USER=defaultuser
RABBITMQ_PASS=defaultpass
CELERY_BROKER_URL=amqp://defaultuser:defaultpass@rabbitmq:5672//
CELERY_BACKEND_URL=redis://redis:6379/0then run
docker compose up --build # run on root project dircreate virtual environment
python3 -m venv venv
# or
python -m venv venvactivate the Virtual Environment
macOS/Linux:
source venv/bin/activateWindows (Command Prompt):
.\\venv\\Scripts\\activate.batWindows (PowerShell):
.\\venv\\Scripts\\Activate.ps1install requirements
pip install -r requirements.txtrun command for celery + rabbitmq + app server
celery -A celery_app worker -l info; uvicorn main:appto clean up pycache, make sure to stage ur changes before running the command
find . -name "__pycache__" -type d -exec rm -r {} +
to exit the virtual environment, simply run:
deactivatethe terminal prompt will return to its normal state.