-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
163 lines (151 loc) · 3.94 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
version: "3.9" # optional since v1.27.0
services:
block-streamer:
build:
context: .
dockerfile: ./block-streamer/Dockerfile
args:
- CARGO_BUILD_MODE=debug
depends_on:
- redis
environment:
SERVER_PORT: 8002
REDIS_URL: redis://redis
AWS_ACCESS_KEY_ID:
AWS_SECRET_ACCESS_KEY:
AWS_REGION: eu-central-1
RUST_LOG: info
ports:
- "8002:8002"
coordinator:
build:
context: .
dockerfile: ./coordinator/Dockerfile
args:
- CARGO_BUILD_MODE=debug
depends_on:
- redis
environment:
REDIS_URL: redis://redis
BLOCK_STREAMER_URL: http://block_streamer:8001
RUNNER_URL: http://runner:7001
REGISTRY_CONTRACT_ID: dev-queryapi.dataplatform.near
RUST_LOG: info
RPC_URL: https://archival-rpc.mainnet.near.org
runner:
build:
context: ./runner
depends_on:
- "hasura-graphql"
- "redis"
environment:
REGION: eu-central-1
HASURA_ENDPOINT: http://hasura-graphql:8080
HASURA_ADMIN_SECRET: myadminsecretkey
REDIS_CONNECTION_STRING: redis://redis
PGHOST: pgbouncer
PGHOST_HASURA: pgbouncer
PGPORT: 6432
PGUSER: postgres
PGPASSWORD: postgrespassword
PGDATABASE: postgres
PORT: 9180
AWS_REGION: eu-central-1
AWS_ACCESS_KEY_ID:
AWS_SECRET_ACCESS_KEY:
GRPC_SERVER_PORT: 7001
PREFETCH_QUEUE_LIMIT: 10
TRACING_EXPORTER: ZIPKIN # CONSOLE, GCP, ZIPKIN, or NONE
ZIPKIN_ENDPOINT: http://zipkin:9411/api/v2/spans
GCP_PROJECT_ID:
TRACING_SAMPLE_RATE: 0.1
MAX_PG_POOL_SIZE: 10
ports:
- "7001:7001"
redis:
image: redis
command:
- redis-server
- "--save 60 1"
- "--loglevel warning"
volumes:
- redis:/data
ports:
- "6379:6379"
postgres:
image: postgres:14
restart: always
volumes:
- ./init-scripts/postgres:/docker-entrypoint-initdb.d
- postgres:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: postgrespassword
ports:
- "5432:5432"
pgbouncer:
image: darunrs/pgbouncer:auth_dbname # TODO: Replace with edoburu:pgbouncer image once it supports auth_dbname
environment:
LISTEN_PORT: 6432
DB_HOST: postgres
DB_USER: pgbouncer
DB_PASSWORD: pgbouncer
ADMIN_USERS: postgres
DB_NAME: "*"
AUTH_TYPE: scram-sha-256
AUTH_FILE: /etc/pgbouncer/userlist.txt
AUTH_USER: pgbouncer
AUTH_QUERY: SELECT uname, phash FROM public.user_lookup($1::text)
AUTH_DBNAME: postgres
MAX_CLIENT_CONN: 4000 # Max Connections to PgBouncer
DEFAULT_POOL_SIZE: 10 # Standard connections open per user/db combo
ports:
- "6432:6432"
depends_on:
- postgres
hasura-auth:
build:
context: ./hasura-authentication-service
ports:
- "4000:4000"
environment:
PORT: 4000
DEFAULT_HASURA_ROLE: append
hasura-graphql:
image: hasura/graphql-engine:latest
ports:
- "8080:8080"
depends_on:
- "postgres"
- "hasura-auth"
restart: always
environment:
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
HASURA_GRAPHQL_DEV_MODE: "true"
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey
HASURA_GRAPHQL_AUTH_HOOK: http://hasura-auth:4000/auth
grafana:
image: grafana/grafana
volumes:
- grafana:/var/lib/grafana
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=secret
prometheus:
image: prom/prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
zipkin:
image: openzipkin/zipkin
ports:
- "9411:9411"
environment:
- STORAGE_TYPE=mem
volumes:
postgres:
redis:
grafana: