-
Notifications
You must be signed in to change notification settings - Fork 429
/
docker-compose.yml
54 lines (49 loc) · 1.49 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
53
54
# 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
tags:
- django-celery-beat_base:latest
command: ["sleep", "inf"]
django:
depends_on:
- base
- postgres
- rabbit
build:
context: .
dockerfile: docker/django/Dockerfile
ports:
- "${DJANGO_HOST:-127.0.0.1}:${DJANGO_PORT:-58000}:8000"
entrypoint: ["/app/docker/django/entrypoint.sh"]
command: ["python3", "manage.py", "runserver", "0.0.0.0:${DJANGO_PORT:-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://${RABBITMQ_USER:-guest}:${RABBITMQ_PASSWORD:-guest}@${RABBITMQ_HOST:-rabbit}:${RABBITMQ_PORT:-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:
- "${RABBITMQ_PORT:-5672}:5672"
postgres:
image: postgres
environment:
POSTGRES_PASSWORD: s3cr3t