-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
86 lines (81 loc) · 1.87 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
services:
skale-proxy:
environment:
ETH_ENDPOINT: ${ETH_ENDPOINT}
HEARTBEAT_URL: ${HEARTBEAT_URL}
image: skale-proxy:latest
container_name: proxy_admin
build:
context: .
dockerfile: Dockerfile
volumes:
- ./data:/usr/src/proxy/data
- ./www:/usr/src/proxy/www
- ./conf:/usr/src/proxy/conf/
- /var/run/docker.sock:/var/run/docker.sock
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "200m"
restart: unless-stopped
nginx:
image: nginx:1.24.0
container_name: proxy_nginx
network_mode: host
volumes:
- ./data:/data
- ./www:/usr/share/nginx/www/files
- ./config/nginx.conf:/etc/nginx/nginx.conf:ro
- ./conf:/etc/nginx/conf/
logging:
driver: "json-file"
options:
max-file: "200"
max-size: "500m"
metrics:
environment:
ETH_ENDPOINT: ${ETH_ENDPOINT}
NETWORK_NAME: ${NETWORK_NAME}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_HOST: db
MYSQL_DATABASE: metrics
image: metrics:latest
container_name: metrics
build:
context: ./metrics
dockerfile: Dockerfile
volumes:
- ./www:/usr/src/metrics/www
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "50m"
restart: unless-stopped
depends_on:
- db
networks:
- proxy
db:
image: mysql:8.0
container_name: db
restart: always
environment:
- MYSQL_DATABASE=metrics
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
volumes:
- mysql_data:/var/lib/mysql
- ./mysql-init:/docker-entrypoint-initdb.d
networks:
- proxy
ports:
- "3306:3306"
volumes:
mysql_data:
networks:
proxy:
driver: bridge