-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
149 lines (137 loc) · 3.21 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
version: "3.8"
volumes:
elasticsearch_volume:
static_volume: null
media_volume: null
build_folder: null
services:
backend:
build: ./backend
command: >
bash -c "python setup_es.py &&
python manage.py makemigrations &&
python manage.py migrate &&
python manage.py runserver 0.0.0.0:8080"
ports:
- "8080:8080"
volumes:
- ./backend:/app
depends_on:
elasticsearch:
condition: service_healthy
frontend:
build:
context: ./frontend
args:
API_URL: "*"
environment:
- REACT_APP_BACKEND_URL=http://localhost:8000
volumes:
- ./frontend/:/frontend
- build_folder:/frontend/build
- ./frontend/node_modules/:/frontend/node_modules
tty: true
prometheus:
image: prom/prometheus
container_name: prometheus
volumes:
- ./prometheus/config/:/etc/prometheus/
ports:
- 9090:9090
command:
- '--web.enable-lifecycle'
- '--config.file=/etc/prometheus/prometheus.yml'
restart: always
grafana:
image: grafana/grafana
container_name: grafana
depends_on:
- prometheus
ports:
- 3100:3100
volumes:
- ./grafana/grafana.ini:/etc/grafana/grafana.ini
restart: always
redis:
container_name: redis
image: redis:latest
hostname: redis
ports:
- "6379:6379"
rabbitmq:
container_name: rabbitmq
image: rabbitmq:3-management-alpine
environment:
- RABBITMQ_USER=guest
- RABBITMQ_PASSWORD=guest
ports:
- "5672:5672" # Default Port
- "15672:15672" # For UI
expose:
- "15672"
celery_worker:
container_name: celery_worker
build:
context: ./backend
dockerfile: dockerfile
volumes:
- ./backend:/backend
ports: []
depends_on:
- rabbitmq
- redis
- backend
environment:
- C_FORCE_ROOT=true
command: sh -c "celery -A backend worker --loglevel=info"
elasticsearch:
build:
context: elastic_search/
args:
ELK_VERSION: 7.16.3
restart: always
volumes:
- ./elastic_search/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro,z
- elasticsearch_volume:/usr/share/elasticsearch/data:z
ports:
- "9200:9200"
environment:
ES_JAVA_OPTS: "-Xmx256m -Xms256m"
discovery.type: single-node
healthcheck:
test: curl -u elastic:elastic -s -f elasticsearch:9200/_cat/health >/dev/null || exit 1
interval: 30s
timeout: 10s
retries: 5
nginx:
build: ./nginx
ports:
- 80:8080
volumes:
- static_volume:/backend/staticfiles
- media_volume:/backend/mediafiles
- build_folder:/var/www/frontend
depends_on:
- backend
- frontend
kibana:
container_name: kibana
image: kibana:7.16.3
ports:
- "5601:5601"
depends_on:
- elasticsearch
cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
container_name: cadvisor
ports:
- 8090:8090
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
depends_on:
- redis
command:
- '-port=8090'