-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
executable file
·96 lines (85 loc) · 1.7 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
version: "3.8"
services:
# Redis
redis:
restart: always
image: redis:alpine
container_name: redis
ports:
- 6379:6379
# Database Postgres
db:
image: postgres
volumes:
- ./data/db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=academy
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=siyamak1981
ports:
- "5432:5432"
container_name: postgres_db
#elasticsearch
es:
image: elasticsearch:7.16.2
environment:
- discovery.type=single-node
ports:
- "9200:9200"
# Django Application
app:
build: .
volumes:
- .:/django
ports:
- 8000:8000
image: app:django
container_name: django_app
command: >
sh -c "python3 manage.py migrate &&
python3 manage.py runserver 0.0.0.0:8000"
env_file:
- .env
depends_on:
- db
- es
#channels
worker_channels:
build: .
command: python manage.py runworker
volumes:
- .:/django
links:
- redis
channels:
build: .
command: daphne -b 0.0.0.0 -p 8001 insurance.asgi:application
volumes:
- .:/django
ports:
- "8001:8001"
links:
- redis
# Celery
celery:
restart: always
build:
context: .
command: celery -A insurance worker -l DEBUG
volumes:
- .:/django
container_name: celery
depends_on:
- db
- redis
- app
celerybeat:
build:
context: .
command: celery -A insurance beat -l INFO
volumes:
- .:/django
depends_on:
- db
- redis
- app