forked from mdawar/rq-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
136 lines (127 loc) · 3.32 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
version: '3.7'
volumes:
grafana_data:
driver: local
services:
rq_exporter:
build:
context: .
dockerfile: Dockerfile
image: mdawar/rq-exporter:latest
# You can also configure the exporter using command line options
# command: --redis-host redis --redis-pass 123456
ports:
- target: 9726
published: 9726
protocol: tcp
mode: host
environment:
RQ_REDIS_HOST: "redis"
RQ_REDIS_PASS: "123456"
volumes:
# Mount the package for development
- type: bind
source: ./rq_exporter
target: /app/rq_exporter
depends_on:
- redis
redis:
image: redis:5.0-alpine
ports:
- target: 6379
published: 6379
protocol: tcp
mode: host
command:
- redis-server
- --bind 0.0.0.0
- --requirepass 123456
- --loglevel notice
# RQ workers
# To run multiple replicas use:
# docker-compose --compatibility up
worker:
image: mdawar/rq-exporter:latest
entrypoint: []
command: rq worker high default low --url redis://:123456@redis:6379/0
working_dir: /home/worker
volumes:
# Mount a sample project
- type: bind
source: ./docker-compose/project
target: /home/worker
depends_on:
- redis
- rq_exporter
deploy:
replicas: 2
# Enqueue jobs for testing
enqueue:
image: mdawar/rq-exporter:latest
entrypoint: []
command: python -u enqueue.py
environment:
RQ_REDIS_HOST: "redis"
RQ_REDIS_PASS: "123456"
working_dir: /home/enqueue
volumes:
# Mount a sample project
- type: bind
source: ./docker-compose/project
target: /home/enqueue
depends_on:
- redis
- rq_exporter
# RQ dashboard
# https://github.com/Parallels/rq-dashboard
dashboard:
image: eoranged/rq-dashboard
command: -u redis://:123456@redis:6379/0
ports:
- target: 9181
published: 9181
protocol: tcp
mode: host
depends_on:
- redis
prometheus:
image: prom/prometheus:v2.17.2
ports:
- target: 9090
published: 9090
protocol: tcp
mode: host
volumes:
# Prometheus config file
- type: bind
source: ./docker-compose/prometheus.yml
target: /etc/prometheus/prometheus.yml
grafana:
image: grafana/grafana:6.7.3
ports:
- target: 3000
published: 3000
protocol: tcp
mode: host
environment:
GF_SECURITY_ADMIN_USER: admin
GF_SECURITY_ADMIN_PASSWORD: admin
volumes:
# Grafana datasources
# https://grafana.com/docs/grafana/latest/administration/provisioning/#datasources
- type: bind
source: ./docker-compose/grafana-datasources.yml
target: /etc/grafana/provisioning/datasources/datasources.yaml
# Grafana dashboards config
# https://grafana.com/docs/grafana/latest/administration/provisioning/#dashboards
- type: bind
source: ./docker-compose/grafana-dashboards.yml
target: /etc/grafana/provisioning/dashboards/dashboards.yaml
# # RQ dashboard
- type: bind
source: ./grafana/rq-dashboard.json
target: /etc/grafana/dashboards/rq-dashboard.json
# Grafana data
- type: volume
source: grafana_data
target: /var/lib/grafana