-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
119 lines (110 loc) · 2.53 KB
/
docker-compose.yml
File metadata and controls
119 lines (110 loc) · 2.53 KB
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
version: "3.9"
networks:
app-net:
driver: bridge
monitoring-net:
driver: bridge
services:
backend:
container_name: backend
build:
context: .
dockerfile: backend/Dockerfile
image: deepdiv/backend:v1.0
expose:
- "8000"
environment:
PYTHONPATH: /app
networks:
- app-net
- monitoring-net
frontend:
container_name: frontend
build:
context: .
dockerfile: frontend/Dockerfile
image: deepdiv/frontend:v1.0
expose:
- "8501"
environment:
BACKEND_SERVICE_URL: http://backend:8000
PYTHONPATH: /app
networks:
- app-net
prometheus:
image: prom/prometheus:latest
container_name: prometheus
volumes:
- ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml:ro
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--web.external-url=http://localhost/monitoring/prometheus/"
- "--web.route-prefix=/monitoring/prometheus"
expose:
- "9090"
networks:
- monitoring-net
grafana:
image: grafana/grafana:10.4.3
container_name: grafana
expose:
- "3000"
environment:
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_ADMIN_PASSWORD}
GF_USERS_ALLOW_SIGN_UP: "false"
GF_SERVER_ROOT_URL: "%(protocol)s://%(domain)s/monitoring/grafana/"
GF_SERVER_SERVE_FROM_SUB_PATH: "true"
depends_on:
- prometheus
networks:
- monitoring-net
node-exporter:
image: prom/node-exporter:v1.7.0
container_name: node-exporter
expose:
- "9100"
networks:
- monitoring-net
loki:
image: grafana/loki:2.9.4
container_name: loki
volumes:
- ./monitoring/loki-config.yaml:/etc/loki/config.yaml:ro
command: -config.file=/etc/loki/config.yaml
expose:
- "3100"
networks:
- monitoring-net
promtail:
image: grafana/promtail:2.9.4
container_name: promtail
volumes:
- ./monitoring/promtail-config.yaml:/etc/promtail/config.yaml:ro
- /var/run/docker.sock:/var/run/docker.sock
command: -config.file=/etc/promtail/config.yaml
expose:
- "9080"
depends_on:
- loki
networks:
- monitoring-net
nginx:
container_name: nginx
build:
context: .
dockerfile: nginx/Dockerfile
image: deepdiv/nginx:v1.0
env_file:
- .env
ports:
- "80:80"
- "443:443"
# depends_on:
# - backend
# - frontend
# - prometheus
# - grafana
# - loki
networks:
- app-net
- monitoring-net