diff --git a/Changelog.md b/Changelog.md index 1aada65..03d8710 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,8 @@ +## 22.06.2024 +1. Added DevOps independent consumer +2. Updated readme.md +3. Changed ```request_processing_seconds``` metric type from summary to histogram + ## 21.06.2024 1. Added worker for each team diff --git a/README.md b/README.md index 93405bd..1ddb7aa 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,33 @@ # Finding-forwarder Service forwards findings from forta-local-node to telegram, opsGenia and discord - ## How to use the template - 1. Clone repository + ## How to develop + 1. Install go1.22.3+ 2. cd root repository 3. make tools 4. make vendor 5. copy `sample.env` to `.env` - 6. docker-compose up -d - 7. make build - 8. Run service ./bin/service + 6. clone https://github.com/lidofinance/alerting-forta/ + 1. cd ethereum-steth + 2. make steth + 7. clone https://github.com/forta-network/forta-node/ + 1. cd forta-node + 2. make containers + 8. Go back to current project then docker-compose up -d -## Where I have to start to code my custom logic? -* [Register handler](./internal/app/server/routes.go) -* [Logic layer](./internal/pkg/telegram): /internal/pkg/your_package_name/. Just see an example with [User package](./internal/pkg/telegram) -* [Env](./internal/env/env.go) -* [Connecters](./internal/connectors) pg, logger, redis and etc... -* For external clients you have to create folder in ./internal/clients//client.go where your_client_name - is google_client, alchemy or internal client for private network. +### I dont need steth-bot. What I have to do? +1. comment service-ethereum-steth in docker-compose file +2. on your local host in your bot repo - ```yarn start``` +3. Also, you have to provide the container name of your bot to FORTA-SOFTWARE by analogy with steth: + 1. Container name for steth is **ethereum-steth** look docker-compose file + 2. put bot's container name to the file forta-local-config.yml by analogy with steth + 3. Consider that in app has programmed consumer for your team bot or use fallback consumer + (provider any name that not included in the list internal/utils/registry/registry.go) + +### I want to develop finding-forwarder server or worker +1. comment forwarder-server or forwarder-worker in docker-compose file +2. provide env variable for application that it could connect to nats in docker ## Docs and rules 1. [App structure layout](./docs/structure.md) -2. [Code style](./docs/code_style.md) - -## Current drivers or dependencies - -1. Logger - [Logrus](https://github.com/sirupsen/logrus) -2. Mockery [Mockery](https://github.com/vektra/mockery) -3. Http router [go-chi](https://github.com/go-chi/chi) -4. Env reader [Viper](https://github.com/spf13/viper) +2. [Code style](./docs/code_style.md) \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 32d22d0..767b856 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -40,6 +40,7 @@ services: depends_on: - service-forta-nats - service-forta-json-rpc + - service-ethereum-steth forwarder-server: container_name: finding-forwarder-server @@ -87,4 +88,20 @@ services: - NATS_DEFAULT_URL=${NATS_DEFAULT_URL} - BOT_CONTAINERS=${BOT_CONTAINERS} ports: - - '8081:8080' \ No newline at end of file + - '8081:8080' + + service-ethereum-steth: + container_name: ethereum-steth + logging: *default-logging + image: monitoring/steth:latest + restart: unless-stopped + environment: + - APP_NAME=ethereum-steth + - INSTANCE=forta-local-host + - ETHEREUM_RPC_URL=http://forta-json-rpc:8545 + - USE_FORTA_RPC_URL=false + - NODE_ENV=production + depends_on: + - service-forta-json-rpc + ports: + - '3000:3000' \ No newline at end of file diff --git a/forta-local-config.yml b/forta-local-config.yml index 9c0bcd7..af04d8e 100644 --- a/forta-local-config.yml +++ b/forta-local-config.yml @@ -13,4 +13,5 @@ localMode: standalone: enable: true botContainers: - - host.docker.internal \ No newline at end of file + - host.docker.internal + - ethereum-steth \ No newline at end of file