Commit d9b943ab authored by Will Cory's avatar Will Cory

fix(indexer): Run docker-compose for indexer correctly

parent 656eda80
...@@ -105,7 +105,7 @@ func NewCli(GitVersion string, GitCommit string, GitDate string) *Cli { ...@@ -105,7 +105,7 @@ func NewCli(GitVersion string, GitCommit string, GitDate string) *Cli {
Action: runApi, Action: runApi,
}, },
{ {
Name: "indexer", Name: "index",
Flags: flags, Flags: flags,
Description: "Runs the indexing service", Description: "Runs the indexing service",
Action: runIndexer, Action: runIndexer,
......
...@@ -20,22 +20,14 @@ services: ...@@ -20,22 +20,14 @@ services:
indexer: indexer:
build: build:
context: .. context: ..
dockerfile: indexer/Dockerfile.refresh dockerfile: indexer/Dockerfile
command: ["indexer-refresh", "processor"] command: ["indexer", "index"]
# healthcheck:
# Add healthcheck once figure out good way how
# maybe after we add metrics?
ports:
- 8080:8080
environment: environment:
- INDEXER_DB_PORT=5432 - INDEXER_RPC_URL_L1=$INDEXER_RPC_URL_L1
- INDEXER_DB_USER=db_username - INDEXER_RPC_URL_L2=$INDEXER_RPC_URL_L2
- INDEXER_DB_PASSWORD=db_password - INDEXER_CONFIG=/indexer/indexer.toml
- INDEXER_DB_NAME=db_name
- INDEXER_DB_HOST=postgres
- INDEXER_CONFIG=/configs/indexer.toml
volumes: volumes:
- ./indexer.toml:/configs/indexer.toml - ./indexer.toml:/indexer/indexer.toml
depends_on: depends_on:
postgres: postgres:
condition: service_healthy condition: service_healthy
......
...@@ -9,11 +9,11 @@ l1-rpc = "${INDEXER_RPC_URL_L1}" ...@@ -9,11 +9,11 @@ l1-rpc = "${INDEXER_RPC_URL_L1}"
l2-rpc = "${INDEXER_RPC_URL_L2}" l2-rpc = "${INDEXER_RPC_URL_L2}"
[db] [db]
host = "127.0.0.1" host = "postgres"
port = 5432 port = 5432
user = "postgres" user = "db_username"
password = "postgres" password = "db_password"
name = "indexer" name = "db_name"
[api] [api]
host = "127.0.0.1" host = "127.0.0.1"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment