I think network_mode: host is correct here
This commit is contained in:
parent
944496b076
commit
9d17b8afbb
2 changed files with 39 additions and 39 deletions
|
@ -9,13 +9,12 @@ services:
|
||||||
- es01
|
- es01
|
||||||
image: lbry/hub:latest
|
image: lbry/hub:latest
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
|
||||||
- "50051:50051" # rpc port
|
|
||||||
environment:
|
environment:
|
||||||
#- TCP_PORT=50051 # should probably have these supported by the go server too
|
#- TCP_PORT=50051 # should probably have these supported by the go server too
|
||||||
#- TCP_HOST=0.0.0.0
|
#- TCP_HOST=0.0.0.0
|
||||||
- ELASTIC_HOST=http://127.0.0.1
|
- ELASTIC_HOST=http://127.0.0.1
|
||||||
- ELASTIC_PORT=9200
|
- ELASTIC_PORT=9200
|
||||||
|
network_mode: host
|
||||||
es01:
|
es01:
|
||||||
image: docker.elastic.co/elasticsearch/elasticsearch:7.12.1
|
image: docker.elastic.co/elasticsearch/elasticsearch:7.12.1
|
||||||
container_name: es01
|
container_name: es01
|
||||||
|
@ -32,7 +31,4 @@ services:
|
||||||
hard: -1
|
hard: -1
|
||||||
volumes:
|
volumes:
|
||||||
- es01:/usr/share/elasticsearch/data
|
- es01:/usr/share/elasticsearch/data
|
||||||
ports:
|
network_mode: host
|
||||||
- "9200:9200"
|
|
||||||
- "9300:9300"
|
|
||||||
#- 127.0.0.1:9200:9200
|
|
||||||
|
|
|
@ -614,7 +614,11 @@ func (s *Server) Search(ctx context.Context, in *pb.SearchRequest) (*pb.Outputs,
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalln(err)
|
log.Fatalln(err)
|
||||||
}
|
}
|
||||||
searchIndices := make([]string, len(indices)-1)
|
var numIndices = 0
|
||||||
|
if len(indices) > 0 {
|
||||||
|
numIndices = len(indices) - 1
|
||||||
|
}
|
||||||
|
searchIndices := make([]string, numIndices)
|
||||||
j := 0
|
j := 0
|
||||||
for i := 0; i < len(indices); i++ {
|
for i := 0; i < len(indices); i++ {
|
||||||
if indices[i] == "claims" {
|
if indices[i] == "claims" {
|
||||||
|
|
Loading…
Reference in a new issue