Skip to content

Commit 0b07f8c

Browse files
Add rabbitmq instead of redis
1 parent 1814ec2 commit 0b07f8c

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ celery -A styleguide_example.tasks beat -l info --scheduler django_celery_beat.s
229229
```
230230

231231
## Helpful commands for local development with docker-compose
232+
232233
To build and run everything
233234

234235
```
@@ -249,4 +250,4 @@ docker-compose run django python manage.py shell
249250

250251
## Heroku
251252

252-
The project is ready to be deployed on Heroku. There's a current deployment that can be found - <https://hacksoft-styleguide-example.herokuapp.com/>
253+
The project is ready to be deployed on Heroku. There's a current deployment that can be found - <https://hacksoft-styleguide-example.herokuapp.com/>

docker-compose.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,30 @@ services:
88
- POSTGRES_USER=postgres
99
- POSTGRES_PASSWORD=postgres
1010

11+
rabbitmq:
12+
image: "rabbitmq:alpine"
13+
14+
healthcheck:
15+
test: rabbitmq-diagnostics -q ping
16+
interval: 30s
17+
timeout: 30s
18+
retries: 3
19+
1120
django:
1221
build:
1322
context: .
1423
dockerfile: docker/local.Dockerfile
1524
command: python manage.py runserver 0.0.0.0:8000
1625
environment:
1726
- DATABASE_URL=postgres://postgres:postgres@db:5432/styleguide_example_db
18-
- CELERY_BROKER_URL=redis://redis
27+
- CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:5672//
1928
volumes:
2029
- .:/app
2130
ports:
2231
- "8000:8000"
2332
depends_on:
2433
- db
25-
- redis
34+
- rabbitmq
2635
restart: on-failure
2736

2837
celery:
@@ -32,12 +41,12 @@ services:
3241
command: celery -A styleguide_example.tasks worker -l info --without-gossip --without-mingle --without-heartbeat
3342
environment:
3443
- DATABASE_URL=postgres://postgres:postgres@db:5432/styleguide_example_db
35-
- CELERY_BROKER_URL=redis://redis
44+
- CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:5672//
3645
volumes:
3746
- .:/app
3847
depends_on:
3948
- db
40-
- redis
49+
- rabbitmq
4150
restart: on-failure
4251

4352
beats:
@@ -47,13 +56,10 @@ services:
4756
command: celery -A styleguide_example.tasks beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler
4857
environment:
4958
- DATABASE_URL=postgres://postgres:postgres@db:5432/styleguide_example_db
50-
- CELERY_BROKER_URL=redis://redis
59+
- CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:5672//
5160
volumes:
5261
- .:/app
5362
depends_on:
5463
- db
55-
- redis
64+
- rabbitmq
5665
restart: on-failure
57-
58-
redis:
59-
image: "redis:alpine"

requirements/base.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ djangorestframework==3.13.1
66
celery==5.2.3
77
django-celery-results==2.2.0
88
django-celery-beat==2.2.1
9-
celery[redis]
109

1110
whitenoise==5.3.0
1211

0 commit comments

Comments
 (0)