Skip to content

Commit 0582894

Browse files
committed
fix: docker-compose environment variable override for CELERY_BROKER_URL
1 parent 71b3bca commit 0582894

3 files changed

Lines changed: 21 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ When a task is created through the API, a Celery worker will automatically:
108108
- Write an entry like this to `logs/task_activity.log`:
109109

110110
```
111-
[2025-09-14 19:45:00] Task #12 ('Example Task') was created
111+
[2025-09-14 19:45:00] Task #12 ('Example Task') was created via Celery background task.
112112
```
113113

114114
---

docker-compose.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ services:
1212
env_file:
1313
- .env
1414
environment:
15+
# Useful if override needed, else .env handles it
1516
POSTGRES_HOST: db
17+
CELERY_BROKER_URL: amqp://guest:guest@rabbitmq:5672//
18+
1619

1720
db:
1821
image: postgres
@@ -25,8 +28,8 @@ services:
2528
rabbitmq:
2629
image: rabbitmq:management
2730
ports:
28-
- "5672:5672"
29-
- "15672:15672"
31+
- "5672:5672" # AMQP (used by Celery)
32+
- "15672:15672" # RabbitMQ management UI
3033

3134
celery:
3235
build: .
@@ -38,3 +41,7 @@ services:
3841
- rabbitmq
3942
env_file:
4043
- .env
44+
environment:
45+
# Useful if override needed, else .env handles it
46+
POSTGRES_HOST: db
47+
CELERY_BROKER_URL: amqp://guest:guest@rabbitmq:5672//

lint-clean.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
echo "🔍 Linting and fixing with Ruff (ignoring migrations)..."
4+
5+
# Lint and auto-fix, ignoring migration files
6+
ruff check --fix . --exclude migrations
7+
8+
# Format code (also ignores excluded by default)
9+
ruff format . --exclude migrations
10+
11+
echo "✅ Code linted and formatted!"

0 commit comments

Comments
 (0)