feat: add user ops indexer to docker compose configs (#10010)

* feat: add user ops indexer to docker compose configs

* fix: missing env in .gitignore
docker-compose-changing-fe-port
Kirill Fedoseev 7 months ago committed by GitHub
parent f1392fc6ad
commit 55144018fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      docker-compose/README.md
  2. 8
      docker-compose/docker-compose.yml
  3. 4
      docker-compose/envs/common-blockscout.env
  4. 48
      docker-compose/envs/common-user-ops-indexer.env
  5. 8
      docker-compose/erigon.yml
  6. 7
      docker-compose/external-backend.yml
  7. 7
      docker-compose/external-db.yml
  8. 8
      docker-compose/external-frontend.yml
  9. 8
      docker-compose/ganache.yml
  10. 8
      docker-compose/geth-clique-consensus.yml
  11. 8
      docker-compose/geth.yml
  12. 8
      docker-compose/hardhat-network.yml
  13. 5
      docker-compose/microservices.yml
  14. 17
      docker-compose/services/user-ops-indexer.yml

@ -25,11 +25,12 @@ This command uses `docker-compose.yml` by-default, which builds the backend of t
- Nginx proxy to bind backend, frontend and microservices. - Nginx proxy to bind backend, frontend and microservices.
- Blockscout explorer at http://localhost. - Blockscout explorer at http://localhost.
and 4 containers for microservices (written in Rust): and 5 containers for microservices (written in Rust):
- [Stats](https://github.com/blockscout/blockscout-rs/tree/main/stats) service with a separate Postgres 14 DB. - [Stats](https://github.com/blockscout/blockscout-rs/tree/main/stats) service with a separate Postgres 14 DB.
- [Sol2UML visualizer](https://github.com/blockscout/blockscout-rs/tree/main/visualizer) service. - [Sol2UML visualizer](https://github.com/blockscout/blockscout-rs/tree/main/visualizer) service.
- [Sig-provider](https://github.com/blockscout/blockscout-rs/tree/main/sig-provider) service. - [Sig-provider](https://github.com/blockscout/blockscout-rs/tree/main/sig-provider) service.
- [User-ops-indexer](https://github.com/blockscout/blockscout-rs/tree/main/user-ops-indexer) service.
**Note for Linux users**: Linux users need to run the local node on http://0.0.0.0/ rather than http://127.0.0.1/ **Note for Linux users**: Linux users need to run the local node on http://0.0.0.0/ rather than http://127.0.0.1/
@ -63,6 +64,7 @@ You can adjust BlockScout environment variables:
- for frontend in `./envs/common-frontend.env` - for frontend in `./envs/common-frontend.env`
- for stats service in `./envs/common-stats.env` - for stats service in `./envs/common-stats.env`
- for visualizer in `./envs/common-visualizer.env` - for visualizer in `./envs/common-visualizer.env`
- for user-ops-indexer in `./envs/common-user-ops-indexer.env`
Descriptions of the ENVs are available Descriptions of the ENVs are available

@ -84,6 +84,14 @@ services:
file: ./services/stats.yml file: ./services/stats.yml
service: stats service: stats
user-ops-indexer:
depends_on:
- db
- backend
extends:
file: ./services/user-ops-indexer.yml
service: user-ops-indexer
proxy: proxy:
depends_on: depends_on:
- backend - backend

@ -318,8 +318,8 @@ MICROSERVICE_SIG_PROVIDER_ENABLED=true
MICROSERVICE_SIG_PROVIDER_URL=http://sig-provider:8050/ MICROSERVICE_SIG_PROVIDER_URL=http://sig-provider:8050/
# MICROSERVICE_BENS_URL= # MICROSERVICE_BENS_URL=
# MICROSERVICE_BENS_ENABLED= # MICROSERVICE_BENS_ENABLED=
# MICROSERVICE_ACCOUNT_ABSTRACTION_ENABLED=true MICROSERVICE_ACCOUNT_ABSTRACTION_ENABLED=false
# MICROSERVICE_ACCOUNT_ABSTRACTION_URL= MICROSERVICE_ACCOUNT_ABSTRACTION_URL=http://user-ops-indexer:8050/
# MICROSERVICE_METADATA_URL= # MICROSERVICE_METADATA_URL=
# MICROSERVICE_METADATA_ENABLED= # MICROSERVICE_METADATA_ENABLED=
DECODE_NOT_A_CONTRACT_CALLS=true DECODE_NOT_A_CONTRACT_CALLS=true

@ -0,0 +1,48 @@
## Those are examples of existing configuration variables and their default values.
## When uncommented, they would overwrite corresponding values from `base.toml`
## configuration file.
USER_OPS_INDEXER__SERVER__HTTP__ENABLED=true
USER_OPS_INDEXER__SERVER__HTTP__ADDR=0.0.0.0:8050
USER_OPS_INDEXER__SERVER__HTTP__MAX_BODY_SIZE=2097152
USER_OPS_INDEXER__SERVER__GRPC__ENABLED=false
USER_OPS_INDEXER__SERVER__GRPC__ADDR=0.0.0.0:8051
USER_OPS_INDEXER__API__MAX_PAGE_SIZE=100
## (required) no default value available
USER_OPS_INDEXER__INDEXER__RPC_URL=""
USER_OPS_INDEXER__INDEXER__CONCURRENCY=20
USER_OPS_INDEXER__INDEXER__ENTRYPOINTS__V06=true
USER_OPS_INDEXER__INDEXER__ENTRYPOINTS__V07=true
USER_OPS_INDEXER__INDEXER__REALTIME__ENABLED=true
USER_OPS_INDEXER__INDEXER__PAST_RPC_LOGS_INDEXER__ENABLED=true
USER_OPS_INDEXER__INDEXER__PAST_RPC_LOGS_INDEXER__BLOCK_RANGE=1000
USER_OPS_INDEXER__INDEXER__PAST_DB_LOGS_INDEXER__ENABLED=true
USER_OPS_INDEXER__INDEXER__PAST_DB_LOGS_INDEXER__START_BLOCK=-100000
USER_OPS_INDEXER__INDEXER__PAST_DB_LOGS_INDEXER__END_BLOCK=0
## (required) no default value available
USER_OPS_INDEXER__DATABASE__CONNECT__URL=""
# OR
#USER_OPS_INDEXER__DATABASE__CONNECT__KV__HOST=
#USER_OPS_INDEXER__DATABASE__CONNECT__KV__PORT=
#USER_OPS_INDEXER__DATABASE__CONNECT__KV__USER=
#USER_OPS_INDEXER__DATABASE__CONNECT__KV__PASSWORD=
#USER_OPS_INDEXER__DATABASE__CONNECT__KV__DBNAME=
USER_OPS_INDEXER__DATABASE__CREATE_DATABASE=false
USER_OPS_INDEXER__DATABASE__RUN_MIGRATIONS=false
USER_OPS_INDEXER__METRICS__ENABLED=true
USER_OPS_INDEXER__METRICS__ADDR=0.0.0.0:6060
USER_OPS_INDEXER__METRICS__ROUTE=/metrics
USER_OPS_INDEXER__JAEGER__ENABLED=false
USER_OPS_INDEXER__JAEGER__AGENT_ENDPOINT=localhost:6831
USER_OPS_INDEXER__TRACING__ENABLED=true
USER_OPS_INDEXER__TRACING__FORMAT=default

@ -69,6 +69,14 @@ services:
file: ./services/stats.yml file: ./services/stats.yml
service: stats service: stats
user-ops-indexer:
depends_on:
- db
- backend
extends:
file: ./services/user-ops-indexer.yml
service: user-ops-indexer
proxy: proxy:
depends_on: depends_on:
- backend - backend

@ -54,6 +54,13 @@ services:
file: ./services/stats.yml file: ./services/stats.yml
service: stats service: stats
user-ops-indexer:
depends_on:
- db
extends:
file: ./services/user-ops-indexer.yml
service: user-ops-indexer
proxy: proxy:
depends_on: depends_on:
- frontend - frontend

@ -53,6 +53,13 @@ services:
file: ./services/stats.yml file: ./services/stats.yml
service: stats service: stats
user-ops-indexer:
depends_on:
- backend
extends:
file: ./services/user-ops-indexer.yml
service: user-ops-indexer
proxy: proxy:
depends_on: depends_on:
- backend - backend

@ -66,6 +66,14 @@ services:
file: ./services/stats.yml file: ./services/stats.yml
service: stats service: stats
user-ops-indexer:
depends_on:
- db
- backend
extends:
file: ./services/user-ops-indexer.yml
service: user-ops-indexer
proxy: proxy:
depends_on: depends_on:
- backend - backend

@ -76,6 +76,14 @@ services:
file: ./services/stats.yml file: ./services/stats.yml
service: stats service: stats
user-ops-indexer:
depends_on:
- db
- backend
extends:
file: ./services/user-ops-indexer.yml
service: user-ops-indexer
proxy: proxy:
depends_on: depends_on:
- backend - backend

@ -70,6 +70,14 @@ services:
file: ./services/stats.yml file: ./services/stats.yml
service: stats service: stats
user-ops-indexer:
depends_on:
- db
- backend
extends:
file: ./services/user-ops-indexer.yml
service: user-ops-indexer
proxy: proxy:
depends_on: depends_on:
- backend - backend

@ -69,6 +69,14 @@ services:
file: ./services/stats.yml file: ./services/stats.yml
service: stats service: stats
user-ops-indexer:
depends_on:
- db
- backend
extends:
file: ./services/user-ops-indexer.yml
service: user-ops-indexer
proxy: proxy:
depends_on: depends_on:
- backend - backend

@ -76,6 +76,14 @@ services:
file: ./services/stats.yml file: ./services/stats.yml
service: stats service: stats
user-ops-indexer:
depends_on:
- db
- backend
extends:
file: ./services/user-ops-indexer.yml
service: user-ops-indexer
proxy: proxy:
depends_on: depends_on:
- backend - backend

@ -41,6 +41,11 @@ services:
file: ./services/stats.yml file: ./services/stats.yml
service: stats service: stats
user-ops-indexer:
extends:
file: ./services/user-ops-indexer.yml
service: user-ops-indexer
proxy: proxy:
depends_on: depends_on:
- visualizer - visualizer

@ -0,0 +1,17 @@
version: '3.9'
services:
user-ops-indexer:
image: ghcr.io/blockscout/user-ops-indexer:${USER_OPS_INDEXER_DOCKER_TAG:-latest}
pull_policy: always
platform: linux/amd64
restart: always
container_name: 'user-ops-indexer'
extra_hosts:
- 'host.docker.internal:host-gateway'
env_file:
- ../envs/common-user-ops-indexer.env
environment:
- USER_OPS_INDEXER__INDEXER__RPC_URL=${USER_OPS_INDEXER__INDEXER__RPC_URL:-ws://host.docker.internal:8545/}
- USER_OPS_INDEXER__DATABASE__CONNECT__URL=${USER_OPS_INDEXER__DATABASE__CONNECT__URL:-postgresql://blockscout:ceWb1MeLBEeOIfk65gU8EjF8@db:5432/blockscout}
- USER_OPS_INDEXER__DATABASE__RUN_MIGRATIONS=true
Loading…
Cancel
Save