-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
63 lines (60 loc) · 1.57 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
services:
rpc-proxy:
build:
context: './nginx-proxy'
container_name: 'rpc-proxy'
restart: 'always'
environment:
CONFIG_HEALTH_CHECKER_URL: 'http://health-checker:8080/providers'
CUSTOM_DNS: '127.0.0.11'
RELOAD_INTERVAL: '10'
ports:
- '8080:8080'
networks:
- 'rpc-network'
volumes:
- './secrets/default_providers.json:/usr/local/openresty/nginx/providers.json'
- './secrets/.htpasswd:/etc/nginx/.htpasswd'
depends_on:
- 'health-checker'
healthcheck:
test: ['CMD-SHELL', 'nc -z 0.0.0.0 8080']
interval: '30s'
timeout: '30s'
retries: 3
start_period: '10s'
health-checker:
build:
context: './rpc-health-checker'
container_name: 'health-checker'
restart: 'always'
environment:
DEFAULT_PROVIDERS_PATH: '/config/default_providers.json'
REFERENCE_PROVIDERS_PATH: '/config/reference_providers.json'
PORT: '8082'
ports:
- '8082:8082'
networks:
- 'rpc-network'
volumes:
- './secrets:/config'
healthcheck:
test: ['CMD-SHELL', 'wget -q -O - http://0.0.0.0:8082/health']
interval: '30s'
timeout: '30s'
retries: 3
start_period: '10s'
rpc-proxy-metrics:
image: 'nginx/nginx-prometheus-exporter:1.4'
container_name: 'rpc-proxy-metrics'
restart: 'always'
command:
- '--nginx.scrape-uri=http://rpc-proxy:8080/stub_status'
- '--web.listen-address=:8090'
ports:
- '8090:8090'
networks:
- 'rpc-network'
networks:
rpc-network:
driver: bridge