Skip to content

Commit

Permalink
load from env
Browse files Browse the repository at this point in the history
  • Loading branch information
TAdev0 committed Apr 10, 2024
1 parent 4706db6 commit 7dfb7f0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 29 deletions.
5 changes: 5 additions & 0 deletions indexer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ services:
- --address=0.0.0.0:7171
environment:
- XDG_DATA_HOME=/data
- APIBARA_STREAM_URL=http://art-peace-apibara-1:7171
- TARGET_URL=http://art-peace-backend-1:8080/consumeIndexerMsg
- LOCALHOST_STREAM_URL=http://localhost:7171
- LOCALHOST_TARGET_URL=http://localhost:8080/consumeIndexerMsg

volumes:
- dna:/data
ports:
Expand Down
10 changes: 7 additions & 3 deletions indexer/docker-script.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
export const config = {
streamUrl: "http://art-peace-apibara-1:7171",
streamUrl:
Deno.env.get("APIBARA_STREAM_URL") || Deno.env.get("LOCALHOST_STREAM_URL"),
startingBlock: 0,
network: "starknet",
finality: "DATA_STATUS_PENDING",
filter: {
events: [
{
fromAddress: Deno.env.get("ART_PEACE_CONTRACT_ADDRESS"),
keys: ["0x2D7B50EBF415606D77C7E7842546FC13F8ACFBFD16F7BCF2BC2D08F54114C23"],
keys: [
"0x2D7B50EBF415606D77C7E7842546FC13F8ACFBFD16F7BCF2BC2D08F54114C23",
],
includeReverted: false,
includeTransaction: false,
includeReceipt: false,
Expand All @@ -16,7 +19,8 @@ export const config = {
},
sinkType: "webhook",
sinkOptions: {
targetUrl: "http://art-peace-backend-1:8080/consumeIndexerMsg"
targetUrl:
Deno.env.get("SINK_TARGET_URL") || Deno.env.get("LOCALHOST_TARGET_URL"),
},
};

Expand Down
26 changes: 0 additions & 26 deletions indexer/script.js

This file was deleted.

0 comments on commit 7dfb7f0

Please sign in to comment.