-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
237 lines (222 loc) · 8.88 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
version: "3.7"
x-log-config: &log-config
logging:
driver: json-file
options:
max-size: "50m"
max-file: "20"
x-traefik-command-le: &traefik-command-le
command:
- "--log.level=${TRAEFIK_LOGLEVEL}"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:${TRAEFIK_HTTP_PORT}"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
- "--entrypoints.web.http.redirections.entrypoint.permanent=true"
- "--entrypoints.websecure.address=:${TRAEFIK_TLS_PORT}"
- "--certificatesresolvers.le.acme.httpchallenge=true"
- "--certificatesresolvers.le.acme.httpchallenge.entrypoint=web"
- "--certificatesresolvers.le.acme.email=${TRAEFIK_ACME_EMAIL}"
- "--certificatesresolvers.le.acme.storage=/letsencrypt/acme.json"
x-traefik-command-nole: &traefik-command-nole
command:
- "--log.level=${TRAEFIK_LOGLEVEL}"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:${TRAEFIK_HTTP_PORT}"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
- "--entrypoints.web.http.redirections.entrypoint.permanent=true"
- "--entrypoints.websecure.address=:${TRAEFIK_TLS_PORT}"
x-monerod-command: &monerod-command
command: >-
--public-node --no-igd
--enable-dns-blocklist --rpc-restricted-bind-ip=0.0.0.0
--rpc-restricted-bind-port=${MONEROD_RESTRICTED_RPC_PORT} --confirm-external-bind
--zmq-pub tcp://0.0.0.0:${MONEROD_ZMQ_PUB_PORT} --zmq-rpc-bind-port=${MONEROD_ZMQ_RPC_PORT} --zmq-rpc-bind-ip=0.0.0.0
--rpc-bind-port=${MONEROD_RPC_PORT} --rpc-bind-ip=0.0.0.0
${MONEROD_EXTRA_PARAMS}
x-tor-service: &tor-service
tor:
container_name: tor
image: vdo1138/tor-hidden-service:${TOR_TAG}
restart: unless-stopped
links:
- monerod
environment:
MONEROD_TOR_SERVICE_HOSTS: "${TOR_HTTP_PORT}:monerod:${MONEROD_RESTRICTED_RPC_PORT}"
volumes:
- ./data/tor:/var/lib/tor/hidden_service/
<<: *log-config
x-explorer-service: &explorer-service
explorer:
image: vdo1138/xmrblocks:${EXPLORER_TAG}
container_name: explorer
restart: unless-stopped
volumes:
- ./data/monero:/home/monero/.bitmonero
ports:
- ${EXPLORER_PORT}
depends_on:
- monerod
labels:
- "traefik.enable=true"
- "traefik.http.routers.explorer.rule=(PathPrefix(`/explorer`) )" #!nole
# - "traefik.http.routers.explorer.rule=(Host(`${DOMAIN}`) && PathPrefix(`/explorer`) )" #!le
# - "traefik.http.routers.explorer.tls.certresolver=le" #!le
- "traefik.http.middlewares.stripprefix-explorer.stripprefix.prefixes=/explorer"
- "traefik.http.routers.explorer.middlewares=stripprefix-explorer"
- "traefik.http.routers.explorer.entrypoints=websecure"
- "traefik.http.routers.explorer.tls"
- "traefik.http.routers.explorer.service=explorer"
- "traefik.http.services.explorer.loadbalancer.server.port=${EXPLORER_PORT}"
<<: *log-config
x-monero-lws-service: &monero-lws-service
monero-lws:
image: vdo1138/monero-lws:${LWS_TAG}
container_name: monero-lws
restart: unless-stopped
security_opt:
- "no-new-privileges:true"
command: >-
--rest-server http://0.0.0.0:8000 --daemon=tcp://monerod:${MONEROD_ZMQ_RPC_PORT}
--sub=tcp://monerod:${MONEROD_ZMQ_PUB_PORT} --log-level=4
--confirm-external-bind ${LWS_EXTRA_PARAMS}
volumes:
- ./data/monero-lws:/home/monero-lws/.bitmonero/
depends_on:
- monerod
labels:
- "traefik.enable=true"
- "traefik.http.routers.monero-lws.rule=(PathPrefix(`/lws`) )" #!nole
# - "traefik.http.routers.monero-lws.rule=(Host(`${DOMAIN}`) && PathPrefix(`/lws`) )" #!le
# - "traefik.http.routers.monero-lws.tls.certresolver=le" #!le
- "traefik.http.middlewares.stripprefix-monero-lws.stripprefix.prefixes=/lws"
- "traefik.http.routers.monero-lws.middlewares=stripprefix-monero-lws"
- "traefik.http.routers.monero-lws.entrypoints=websecure"
- "traefik.http.routers.monero-lws.tls"
- "traefik.http.routers.monero-lws.service=monero-lws"
- "traefik.http.services.monero-lws.loadbalancer.server.port=${LWS_PORT}"
<<: *log-config
x-monero-exporter-service: &monero-exporter-service
monero-exporter:
command:
- --monero-addr=http://monerod:${MONEROD_RPC_PORT}
container_name: monero-exporter
restart: unless-stopped
image: vdo1138/monero-exporter:0.0.2
<<: *log-config
x-p2pool-service: &p2pool-service
p2pool:
image: sethsimmons/p2pool:latest
restart: unless-stopped
container_name: p2pool
#tty: true
#stdin_open: true
volumes:
- ./data/p2pool:/home/p2pool
# - /dev/hugepages:/dev/hugepages:rw
ports:
- ${P2POOL_STRATUM_PORT}:${P2POOL_STRATUM_PORT}
- ${P2POOL_P2P_PORT}:${P2POOL_P2P_PORT}
command: >-
--wallet "${P2POOL_WALLET}"
--stratum "0.0.0.0:${P2POOL_STRATUM_PORT}" --p2p "0.0.0.0:${P2POOL_P2P_PORT}" --rpc-port "${MONEROD_RPC_PORT}"
--addpeers "P2POOL_PEERS" --host "monerod" --no-randomx
x-grafana-service: &grafana-service
grafana:
user: "1000"
command:
- -config=/etc/grafana/grafana.ini
container_name: grafana
restart: unless-stopped
image: grafana/grafana:${GRAFANA_TAG}
ports:
- 3000
volumes:
- ./data/grafana:/var/lib/grafana
- ./config/grafana/grafana.ini:/etc/grafana/grafana.ini:ro
- ./config/grafana/provisioning:/etc/grafana/provisioning:ro
- ./config/grafana/dashboards:/var/lib/grafana/dashboards:ro
environment:
GF_SECURITY_ADMIN_PASSWORD: ${GF_SECURITY_ADMIN_PASSWORD}
labels:
- "traefik.enable=true"
- "traefik.http.routers.grafana.rule=(PathPrefix(`/grafana`) )" #!nole
# - "traefik.http.routers.grafana.rule=(Host(`${DOMAIN}`) && PathPrefix(`/grafana`) )" #!le
# - "traefik.http.routers.grafana.tls.certresolver=le" #!le
- "traefik.http.middlewares.stripprefix-grafana.stripprefix.prefixes=/grafana"
- "traefik.http.routers.grafana.middlewares=stripprefix-grafana"
- "traefik.http.routers.grafana.entrypoints=websecure"
- "traefik.http.routers.grafana.tls"
- "traefik.http.routers.grafana.service=grafana"
- "traefik.http.services.grafana.loadbalancer.server.port=3000"
<<: *log-config
x-prometheus-service: &prometheus-service
prometheus:
user: "1000"
command:
- --config.file=/etc/prometheus/config.yaml
- --storage.tsdb.path=/data
- --storage.tsdb.retention.time=30d
container_name: prometheus
restart: unless-stopped
image: prom/prometheus:${PROMETHEUS_TAG}
volumes:
- ./data/prometheus:/data
- ./config/prometheus/config.yaml:/etc/prometheus/config.yaml:ro
<<: *log-config
x-watchtower-service: &watchtower-service
watchtower:
container_name: watchtower
restart: unless-stopped
image: containrrr/watchtower:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
labels:
- com.centurylinklabs.watchtower.enable="false"
command: --interval 360 --include-stopped
<<: *log-config
services:
traefik:
image: traefik:${TRAEFIK_TAG}
container_name: traefik
ports:
- ${TRAEFIK_HTTP_PORT}:${TRAEFIK_HTTP_PORT}
- ${TRAEFIK_TLS_PORT}:${TRAEFIK_TLS_PORT}
volumes:
- "./data/letsencrypt:/letsencrypt" #!le
- "/var/run/docker.sock:/var/run/docker.sock:ro"
<<: *traefik-command-nole #!traefik-command
restart: always
<<: *log-config
monerod:
container_name: monerod
image: sethsimmons/simple-monerod:${MONEROD_TAG}
<<: *monerod-command
ports:
- "${MONEROD_P2P_PORT}:${MONEROD_P2P_PORT}" # Exposes P2P port
volumes:
- "./data/monero:/home/monero/.bitmonero"
labels:
- "traefik.enable=true"
# - "traefik.http.routers.monerod.rule=(Host(`${DOMAIN}`) && PathPrefix(`/`))" #!le
# - "traefik.http.routers.monerod.tls.certresolver=le" #!le
- "traefik.http.routers.monerod.rule=(PathPrefix(`/`))" #!nole
- "traefik.http.routers.monerod.entrypoints=websecure"
- "traefik.http.routers.monerod.tls"
- "traefik.http.routers.monerod.service=monerod"
- "traefik.http.services.monerod.loadbalancer.server.port=${MONEROD_RESTRICTED_RPC_PORT}"
# - "traefik.http.middlewares.corsheader.headers.accessControlAllowOriginList=${MONEROD_accessControlAllowOriginList}" #!cors
# - "traefik.http.routers.monerod.middlewares=corsheader" #!cors
restart: unless-stopped
<<: *log-config
# <<: *tor-service #!tor
# <<: *explorer-service #!explorer
# <<: *monero-lws-service #!lws
# <<: *monero-exporter-service #!monero-exporter
# <<: *p2pool-service #!p2pool
# <<: *grafana-service #!grafana
# <<: *prometheus-service #!prometheus
# <<: *watchtower-service #!watchtower