Skip to content

Commit

Permalink
fix es-indexer for local dev (#6999)
Browse files Browse the repository at this point in the history
  • Loading branch information
stereosteve authored Dec 20, 2023
1 parent b2c900e commit f2a2ce1
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
4 changes: 4 additions & 0 deletions dev-tools/compose/docker-compose.discovery.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ services:
context: ${PROJECT_ROOT}/packages/es-indexer
dockerfile: Dockerfile
restart: unless-stopped
environment:
audius_elasticsearch_url: http://discovery-provider-elasticsearch:9200
audius_db_url: 'postgresql://postgres:postgres@db:5432/discovery_provider_1'
depends_on:
db:
condition: service_healthy
Expand Down Expand Up @@ -113,6 +116,7 @@ services:
audius_contracts_entity_manager_address: '${ENTITY_MANAGER_ADDRESS}'
audius_eth_contracts_registry: '${ETH_REGISTRY_ADDRESS}'
audius_eth_contracts_token: '${ETH_TOKEN_ADDRESS}'
audius_elasticsearch_url: http://discovery-provider-elasticsearch:9200

audius_solana_endpoint: 'http://solana-test-validator:8899'
audius_solana_track_listen_count_address: '${SOLANA_TRACK_LISTEN_COUNT_PUBLIC_KEY}'
Expand Down
1 change: 0 additions & 1 deletion dev-tools/compose/docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ services:
audius_redis_url: 'redis://discovery-provider-redis:6379/00'

audius_elasticsearch_url: 'http://discovery-provider-elasticsearch:9200'
audius_elasticsearch_run_indexer: 'true'
volumes:
- ${PROJECT_ROOT}/packages/discovery-provider:/audius-discovery-provider
depends_on:
Expand Down
1 change: 0 additions & 1 deletion dev-tools/startup/discovery-provider.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export audius_delegate_private_key=$(printenv "DP${replica}_DELEGATE_OWNER_PRIVA
elasticsearch_host=$(nslookup $(hostname -i) | grep -o "name = .*" | grep -o "[^ ]\+$" | sed 's/discovery-provider/discovery-provider-elasticsearch/')
if nslookup "$elasticsearch_host" >/dev/null 2>&1; then
export audius_elasticsearch_url="http://$elasticsearch_host:9200"
export audius_elasticsearch_run_indexer="true"
fi

# Run register script in background
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export audius_delegate_private_key=$(printenv "DP${replica}_DELEGATE_OWNER_PRIVA
elasticsearch_host="audius-protocol-discovery-provider-elasticsearch-${replica}"
if nslookup "$elasticsearch_host" >/dev/null 2>&1; then
export audius_elasticsearch_url="http://${elasticsearch_host}:9200"
export audius_elasticsearch_run_indexer="true"
fi

npm run dev
1 change: 0 additions & 1 deletion packages/es-indexer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ To run in the discovery container, set env variables:

```
audius_elasticsearch_url=http://elasticsearch:9200
audius_elasticsearch_run_indexer=true
```

## Mapping Changes
Expand Down

0 comments on commit f2a2ce1

Please sign in to comment.