-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
207 lines (207 loc) · 8.69 KB
/
docker-compose.yaml
File metadata and controls
207 lines (207 loc) · 8.69 KB
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
services:
# Archiver node services
qubic-http:
image: ghcr.io/qubic/qubic-http:v0.8.0
container_name: qubic-http
labels:
# Traefik
- "traefik.enable=true"
## Router
- "traefik.http.routers.qubic-http.entrypoints=web"
- "traefik.http.routers.qubic-http.rule=(PathPrefix(`/v1/broadcast-transaction`) || PathPrefix(`/v1/block-height`) || PathPrefix(`/v1/tick-info`) || PathPrefix(`/v1/balances`) || PathPrefix(`/v1/assets`) || PathPrefix(`/v1/querySmartContract`))"
- "traefik.http.routers.qubic-http.middlewares=qubic-http-stripprefix, cors-http"
## Middlewares
- "traefik.http.middlewares.qubic-http-stripprefix.stripprefix.prefixes=/v1"
- "traefik.http.middlewares.cors-http.headers.accesscontrolallowmethods=*"
- "traefik.http.middlewares.cors-http.headers.accesscontrolallowheaders=*"
- "traefik.http.middlewares.cors-http.headers.accesscontrolalloworiginlist=*"
- "traefik.http.middlewares.cors-http.headers.accesscontrolmaxage=300"
- "traefik.http.middlewares.cors-http.headers.addvaryheader=true"
## Services
- "traefik.http.services.qubic-http.loadbalancer.server.port=8000"
environment:
QUBIC_API_SIDECAR_SERVER_HTTP_HOST: "0.0.0.0:8000"
QUBIC_API_SIDECAR_SERVER_GRPC_HOST: "0.0.0.0:8001"
QUBIC_API_SIDECAR_SERVER_MAX_TICK_FETCH_URL: "http://qubic-nodes:8080/max-tick"
QUBIC_API_SIDECAR_POOL_NODE_FETCHER_URL: "http://qubic-nodes:8080/status"
QUBIC_API_SIDECAR_POOL_NODE_FETCHER_TIMEOUT: "20s"
QUBIC_API_SIDECAR_POOL_NODE_PORT: "31841" # Change node port if needed
networks:
- traefik
depends_on:
qubic-nodes:
condition: service_healthy
restart: always
qubic-events:
image: ghcr.io/qubic/go-events:v0.4.0
container_name: qubic-events
labels:
# Traefik
- "traefik.enable=true"
## Router
- "traefik.http.routers.qubic-events.entrypoints=web"
- "traefik.http.routers.qubic-events.rule=PathPrefix(`/v1/events`)"
- "traefik.http.routers.qubic-events.middlewares=cors-events"
- "traefik.http.routers.qubic-events.priority=100"
## Middlewares
- "traefik.http.middlewares.cors-events.headers.accesscontrolallowmethods=*"
- "traefik.http.middlewares.cors-events.headers.accesscontrolallowheaders=*"
- "traefik.http.middlewares.cors-events.headers.accesscontrolalloworiginlist=*"
- "traefik.http.middlewares.cors-events.headers.accesscontrolmaxage=300"
- "traefik.http.middlewares.cors-events.headers.addvaryheader=true"
- "traefik.http.middlewares.customheaders.headers.customresponseheaders.X-Server-Name=test01"
## Service
- "traefik.http.services.qubic-events.loadbalancer.server.port=8000"
environment:
QUBIC_EVENTS_POOL_NODE_FETCHER_URL: "http://qubic-nodes:8080/status"
QUBIC_EVENTS_POOL_NODE_PASSCODES: "IP:AAAAAAAAAAEAAAAAAAAAAgAAAAAAAAADAAAAAAAAAAQ="
QUBIC_EVENTS_PUB_SUB_ENABLED: "false"
QUBIC_EVENTS_QUBIC_PROCESS_TICK_TIMEOUT: "5s"
QUBIC_EVENTS_QUBIC_NODE_PORT: "31841"
volumes:
- ./store/events:/app/store
networks:
- traefik
restart: always
qubic-archiver:
image: ghcr.io/qubic/qubic-archiver:v0.11.1
container_name: qubic-archiver
labels:
# Traefik
- "traefik.enable=true"
## Router
- "traefik.http.routers.qubic-archiver.entrypoints=web"
- "traefik.http.routers.qubic-archiver.rule=PathPrefix(`/v1`) || PathPrefix(`/v2`)"
- "traefik.http.routers.qubic-archiver.middlewares=cors-archiver"
## Middlewares
- "traefik.http.middlewares.cors-archiver.headers.accesscontrolallowmethods=*"
- "traefik.http.middlewares.cors-archiver.headers.accesscontrolallowheaders=*"
- "traefik.http.middlewares.cors-archiver.headers.accesscontrolalloworiginlist=*"
- "traefik.http.middlewares.cors-archiver.headers.accesscontrolmaxage=300"
- "traefik.http.middlewares.cors-archiver.headers.addvaryheader=true"
- "traefik.http.middlewares.customheaders.headers.customresponseheaders.X-Server-Name=test01"
## Service
- "traefik.http.services.qubic-archiver.loadbalancer.server.port=8000"
# - "traefik.http.services.qubic-archiver.loadbalancer.healthcheck.path=/v1/healthcheck"
# - "traefik.http.services.qubic-archiver.loadbalancer.healthcheck.interval=10s"
# - "traefik.http.services.qubic-archiver.loadbalancer.healthcheck.timeout=5s"
# - "traefik.http.services.qubic-archiver.loadbalancer.healthcheck.scheme=http"
ports:
- "127.0.0.1:8001:8000"
environment:
QUBIC_ARCHIVER_SERVER_HTTP_HOST: "0.0.0.0:8000"
QUBIC_ARCHIVER_SERVER_GRPC_HOST: "0.0.0.0:8001"
QUBIC_ARCHIVER_SERVER_NODE_SYNC_THRESHOLD: 3
QUBIC_ARCHIVER_SERVER_CHAIN_TICK_FETCH_URL: "http://qubic-nodes:8080/max-tick"
QUBIC_ARCHIVER_POOL_NODE_FETCHER_URL: "http://qubic-nodes:8080/status"
QUBIC_ARCHIVER_QUBIC_PROCESS_TICK_TIMEOUT: "5s"
QUBIC_ARCHIVER_QUBIC_NODE_PORT: "31841" # Change node port if needed
QUBIC_ARCHIVER_QUBIC_ARBITRATOR_IDENTITY: "MEFKYFCDXDUILCAJKOIKWQAPENJDUHSSYPBRWFOTLALILAYWQFDSITJELLHG"
QUBIC_ARCHIVER_QUBIC_DISABLE_TRANSACTION_STATUS_ADDON: true
volumes:
- ./store/archiver:/app/store
networks:
- traefik
depends_on:
qubic-nodes:
condition: service_healthy
restart: always
qubic-nodes:
image: ghcr.io/qubic/qubic-nodes:v2.1.0
container_name: qubic-nodes
ports:
- "127.0.0.1:8080:8080"
environment:
QUBIC_NODES_QUBIC_PEER_LIST: "IP" # Insert list of node IPs here. Ex: "123.12.12.123;321.32.32.321;312.31.31.312"
QUBIC_NODES_QUBIC_PEER_PORT: "31841"
networks:
- traefik
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://127.0.0.1:8080/status"]
interval: 5s
timeout: 5s
retries: 5
restart: always
traefik:
image: traefik:v3.0.0
container_name: traefik
ports:
- "8000:80"
- "8081:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- traefik
depends_on:
- "qubic-archiver"
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--metrics.prometheus=true"
- "--metrics.prometheus.buckets=0.1,0.3,1.2,5.0"
- "--providers.docker=true"
- "--providers.docker.watch"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
restart: always
mongo:
image: mongo
container_name: "mongo-db"
restart: unless-stopped
volumes:
- ./mongo-data:/data/db
environment:
MONGO_INITDB_ROOT_USERNAME: "qubic"
MONGO_INITDB_ROOT_PASSWORD: "password"
ports:
- "127.0.0.1:27017:27017"
networks:
- traefik
processor:
image: ghcr.io/qubic/qubic-stats-processor:assets
container_name: "stats-processor"
environment:
QUBIC_STATS_PROCESSOR_MONGO_USERNAME: "qubic"
QUBIC_STATS_PROCESSOR_MONGO_PASSWORD: "password"
QUBIC_STATS_PROCESSOR_MONGO_HOSTNAME: "mongo"
QUBIC_STATS_PROCESSOR_SERVICE_ARCHIVER_GRPC_ADDRESS: "qubic-archiver:8001"
networks:
- traefik
depends_on:
- mongo
- qubic-archiver
extra_hosts:
- "host.docker.internal:host-gateway"
restart: always
stats-api:
image: ghcr.io/qubic/qubic-stats-api:assets
container_name: "stats-api"
environment:
QUBIC_STATS_API_MONGO_USERNAME: "qubic"
QUBIC_STATS_API_MONGO_PASSWORD: "password"
QUBIC_STATS_API_MONGO_HOSTNAME: "mongo"
QUBIC_STATS_API_SERVICE_HTTP_ADDRESS: "0.0.0.0:8090"
QUBIC_STATS_API_POOL_NODE_FETCHER_URL: "http://qubic-nodes:8080/status"
QUBIC_STATS_API_POOL_NODE_PORT: 31841
labels:
- "traefik.enable=true"
- "traefik.http.routers.stats-api.rule=PathPrefix(`/v1/latest-stats`) || PathPrefix(`/v1/rich-list`) || PathPrefix(`/v1/issuers`)"
- "traefik.http.routers.stats-api.priority=1000"
- "traefik.http.routers.stats-api.middlewares=cors-stats, stats-customheaders"
- "traefik.http.middlewares.cors-stats.headers.accesscontrolallowmethods=*"
- "traefik.http.middlewares.cors-stats.headers.accesscontrolallowheaders=*"
- "traefik.http.middlewares.cors-stats.headers.accesscontrolalloworiginlist=*"
- "traefik.http.middlewares.cors-stats.headers.accesscontrolmaxage=300"
- "traefik.http.middlewares.cors-stats.headers.addvaryheader=true"
- "traefik.http.middlewares.stats-customheaders.headers.customresponseheaders.X-Server-Name=test01"
- "traefik.http.routers.stats-api.entrypoints=web"
- "traefik.http.services.stats-api.loadbalancer.server.port=8090"
networks:
- traefik
ports:
- "127.0.0.1:8090:8090"
depends_on:
- mongo
restart: always
networks:
traefik: