File tree Expand file tree Collapse file tree 3 files changed +17
-11
lines changed Expand file tree Collapse file tree 3 files changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -229,6 +229,7 @@ celery -A styleguide_example.tasks beat -l info --scheduler django_celery_beat.s
229
229
```
230
230
231
231
## Helpful commands for local development with docker-compose
232
+
232
233
To build and run everything
233
234
234
235
```
@@ -249,4 +250,4 @@ docker-compose run django python manage.py shell
249
250
250
251
## Heroku
251
252
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/ >
Original file line number Diff line number Diff line change @@ -8,21 +8,30 @@ services:
8
8
- POSTGRES_USER=postgres
9
9
- POSTGRES_PASSWORD=postgres
10
10
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
+
11
20
django :
12
21
build :
13
22
context : .
14
23
dockerfile : docker/local.Dockerfile
15
24
command : python manage.py runserver 0.0.0.0:8000
16
25
environment :
17
26
- 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//
19
28
volumes :
20
29
- .:/app
21
30
ports :
22
31
- " 8000:8000"
23
32
depends_on :
24
33
- db
25
- - redis
34
+ - rabbitmq
26
35
restart : on-failure
27
36
28
37
celery :
@@ -32,12 +41,12 @@ services:
32
41
command : celery -A styleguide_example.tasks worker -l info --without-gossip --without-mingle --without-heartbeat
33
42
environment :
34
43
- 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//
36
45
volumes :
37
46
- .:/app
38
47
depends_on :
39
48
- db
40
- - redis
49
+ - rabbitmq
41
50
restart : on-failure
42
51
43
52
beats :
@@ -47,13 +56,10 @@ services:
47
56
command : celery -A styleguide_example.tasks beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler
48
57
environment :
49
58
- 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//
51
60
volumes :
52
61
- .:/app
53
62
depends_on :
54
63
- db
55
- - redis
64
+ - rabbitmq
56
65
restart : on-failure
57
-
58
- redis :
59
- image : " redis:alpine"
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ djangorestframework==3.13.1
6
6
celery==5.2.3
7
7
django-celery-results==2.2.0
8
8
django-celery-beat==2.2.1
9
- celery[redis]
10
9
11
10
whitenoise==5.3.0
12
11
You can’t perform that action at this time.
0 commit comments