-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
150 lines (141 loc) · 3.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
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
150
version: '3.8'
services:
web:
build:
context: .
dockerfile: Dockerfile
command: bash -c "./run_web_service.sh"
volumes:
- static_volume:/home/vsf/web/measurement_navigator/static
expose:
- 8000
env_file:
- ./.env.prod
depends_on:
- db
db:
image: timescale/timescaledb-ha:pg14-latest
volumes:
- postgres_data:/home/postgres/pgdata/data
env_file:
- ./.env.prod.db
shm_size: 1g
hostname: postgres
nginx:
image: nginx:latest
volumes:
- static_volume:/home/vsf/web/measurement_navigator/static
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./measurement_navigator/robots.txt:/home/vsf/web/measurement_navigator/robots.txt
ports:
- 1337:80
- 5555:5555
- 9090:9090
- 3000:3000
- 9100:9100
depends_on:
- web
- flower
hostname: nginx
redis:
image: redis:alpine
expose:
- 6379
celery:
build:
context: .
dockerfile: Dockerfile
command: celery -A vsf worker -l info -s /tmp/celerybeat-schedule
volumes:
- ./:/home/vsf/web
env_file:
- .env.prod
depends_on:
- redis
restart: unless-stopped
celery-beat:
build:
context: .
dockerfile: Dockerfile
command: celery -A vsf beat -l info -s /tmp/celerybeat-schedule
volumes:
- ./:/home/vsf/web
env_file:
- .env.prod
depends_on:
- redis
restart: unless-stopped
flower:
image: mher/flower
command: celery --broker=redis://redis:6379/0 flower --port=5555
ports:
- 5557:5555
depends_on:
- redis
expose:
- 5555
hostname: flower
# Servicios de monitoreo !!!!!!!!!!!!!!!!!
# Herramienta visualizadora
grafana:
image: grafana/grafana:8.0.6
# image: grafana/grafana:8.0.6
container_name: grafana
restart: unless-stopped
volumes:
- grafana-data:/var/lib/grafana
# ports:
# - 3000:3000
expose:
- 3000
# Se encarga de procesar las metricas
prometheus:
image: prom/prometheus
# image: prom/prometheus:v2.28.1
container_name: prometheus
restart: unless-stopped
volumes:
- ./prometheus:/etc/prometheus
- prometheus-data:/prometheus
# ports:
# - 9090:9090
expose:
- 9090
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--storage.tsdb.retention.time=1y'
- '--web.enable-lifecycle'
# Se encarga de enviar metricas de la instancia en general (RAM, ROM, RED...)
node_exporter:
image: prom/node-exporter
# image: quay.io/prometheus/node-exporter:latest
container_name: node_exporter
restart: unless-stopped
# ports:
# - 9100:9100
expose:
- 9100
# TODO probar el bloque que funcione dependiendo del S.O.
###### linux
# command:
# - '--path.rootfs=/host'
# pid: host
# volumes:
# - '/:/host:ro,rslave'
###### windows
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
command:
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- --collector.filesystem.ignored-mount-points
- "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)"
volumes:
postgres_data:
static_volume:
# grafana almacena los dashboards
# prometheus la data de monitoreo
grafana-data:
prometheus-data: