/
docker-compose.yml
80 lines (72 loc) · 1.44 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
version: '3'
services:
# PostgreSQL - Database
db:
image: postgres:12-alpine
container_name: db
hostname: db
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
ports:
- "5432:5432"
volumes:
- postgresql-data:/var/lib/postgresql/data
restart: on-failure
# Redis - Cache & Celery backend
redis:
image: redis:buster
container_name: redis
ports:
- "6379:6379"
# Django - Backend webapp
backend:
container_name: backend
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- "8000:8000"
depends_on:
- db
- redis
# Celery - Manage timed tasks
celery-worker:
container_name: celery-worker
build: .
command: celery -A config worker -l info
volumes:
- .:/code
depends_on:
- redis
links:
- redis
# Celery-Beat - Schedule tasks
celery-beat:
container_name: celery-beat
build: .
command: celery -A config beat -l info
volumes:
- .:/code
depends_on:
- redis
links:
- redis
# Flower - Celery monitoring
celery-flower:
container_name: celery-flower
image: mher/flower
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- FLOWER_PORT=8888
ports:
- 8888:8888
depends_on:
- redis
links:
- redis
volumes:
solr:
postgresql-data: