-
Notifications
You must be signed in to change notification settings - Fork 0
/
ci.docker-compose.yml
42 lines (42 loc) · 2 KB
/
ci.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
---
services:
# run postgres for proxy service to store observability metrics
postgres:
image: postgres:13.12
env_file: .env
ports:
- "${POSTGRES_HOST_PORT}:${POSTGRES_CONTAINER_PORT}"
expose:
- "${POSTGRES_CONTAINER_PORT}"
# run redis for proxy service to cache responses
redis:
image: 'bitnami/redis:latest'
env_file: .env
ports:
- "${REDIS_HOST_PORT}:${REDIS_CONTAINER_PORT}"
expose:
- "${REDIS_CONTAINER_PORT}"
# run proxy service to observe, route, and scale requests to kava api endpoints
proxy:
build:
dockerfile: ci.Dockerfile
env_file: .env
environment:
PROXY_HEIGHT_BASED_ROUTING_ENABLED: "true"
PROXY_SHARDED_ROUTING_ENABLED: "true"
# use public testnet as backend origin server to avoid having
# to self-host a beefy Github Action runner
# to build and run a kava node each execution
PROXY_BACKEND_HOST_URL_MAP: localhost:7777>https://evmrpcdata.internal.testnet.proxy.kava.io,localhost:7778>https://evmrpc.internal.testnet.proxy.kava.io
PROXY_PRUNING_BACKEND_HOST_URL_MAP: localhost:7777>https://evmrpc.internal.testnet.proxy.kava.io
# fake the shards by defining shards with existing backends
PROXY_SHARD_BACKEND_HOST_URL_MAP: localhost:7777>10|https://evmrpcdata.internal.testnet.proxy.kava.io|20|https://evmrpcdata.internal.testnet.proxy.kava.io
EVM_QUERY_SERVICE_URL: https://evmrpc.internal.testnet.proxy.kava.io
# we need the metric to be used from no_metric.env or by default set up as true, so to test the metrics collection.
# doesn't work with the env variable, so need env file. Mentioned here: https://github.com/docker/compose/issues/9737
METRIC_DATABASE_ENABLED: "${METRIC_DATABASE_ENABLED}"
ports:
- "${PROXY_HOST_PORT}:${PROXY_CONTAINER_PORT}"
- "${TEST_UNCONFIGURED_PROXY_PORT}:${PROXY_CONTAINER_PORT}"
- "${PROXY_CONTAINER_EVM_RPC_PRUNING_PORT}:${PROXY_CONTAINER_PORT}"
- "${PROXY_HOST_DEBUG_PORT}:${PROXY_CONTAINER_DEBUG_PORT}"