Skip to content

Commit

Permalink
Merge pull request #54 from Stevesibilia/add_rabbitmq_auth
Browse files Browse the repository at this point in the history
Add RabbitMQ user and password configuration
  • Loading branch information
giohappy authored Jan 31, 2025
2 parents a70154a + c367a08 commit 9eb0d09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ To create the environment configuratino for DJAM create an .env file in the root
DJAM_PROJECT_ENVIRONMENT=local
DJAM_RABBITMQ_HOST=... (default=localhost)
DJAM_RABBITMQ_PORT=... (default=5672)
DJAM_RABBITMQ_USER=... (default=guest)
DJAM_RABBITMQ_PASSWORD=... (default=guest)
DJAM_DB_HOST=<DB host e.g 127.0.0.1>
DJAM_DB_PORT=... (default=5432)
DJAM_DB_NAME=<djam db>
Expand Down
2 changes: 1 addition & 1 deletion project/conf/base/dramatiq.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
DRAMATIQ_BROKER = {
"BROKER": "dramatiq.brokers.rabbitmq.RabbitmqBroker",
"OPTIONS": {
"url": f"amqp://{os.getenv('DJAM_RABBITMQ_HOST', 'localhost')}:{os.getenv('DJAM_RABBITMQ_PORT', '5672')}",
"url": f"amqp://{os.getenv('DJAM_RABBITMQ_USER', 'guest')}:{os.getenv('DJAM_RABBITMQ_PASSWORD', 'guest')}@{os.getenv('DJAM_RABBITMQ_HOST', 'localhost')}:{os.getenv('DJAM_RABBITMQ_PORT', '5672')}",
},
"MIDDLEWARE": [
"dramatiq.middleware.Prometheus",
Expand Down

0 comments on commit 9eb0d09

Please sign in to comment.