forked from celery/django-celery-beat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
52 lines (47 loc) · 1.3 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Copyright (C) 2019 Sebastian Pipping <[email protected]>
# Licensed under the BSD License (3 clause, also known as the new BSD license)
version: '3'
services:
base:
build:
context: .
dockerfile: docker/base/Dockerfile
command: ["sleep", "inf"]
django:
depends_on:
- base
- postgres
- rabbit
build:
context: .
dockerfile: docker/django/Dockerfile
ports:
- "127.0.0.1:58000:8000"
entrypoint: ["/app/docker/django/entrypoint.sh"]
command: ["python3", "manage.py", "runserver", "0.0.0.0:8000"]
tty: true
volumes:
- './django_celery_beat/:/app/django_celery_beat/'
celery-beat:
depends_on:
- base
- postgres
- rabbit
build:
context: .
dockerfile: docker/celery-beat/Dockerfile
entrypoint: ["/app/docker/celery-beat/entrypoint.sh"]
environment:
CELERY_BROKER_URL: 'amqp://guest:guest@rabbit:5672'
command: ["python3", '-m', "celery", "-A", "mysite", "beat", "-l", "info", "--scheduler", "django_celery_beat.schedulers:DatabaseScheduler"]
tty: true
volumes:
- './django_celery_beat/:/app/django_celery_beat/'
rabbit:
image: rabbitmq
ports:
- "5672:5672"
postgres:
image: postgres
environment:
POSTGRES_PASSWORD: s3cr3t