简体   繁体   English

弹性搜索 - APPSearch 主机无法与 docker 一起使用

[英]Elastic Search - APPSearch host not working with docker

i'm using elastic search with appsearch docker images, all is working fine on localhost, but when i try to host the images and route using nginx, appsearch keeps routing to localhost:3002 instead of the host url我正在使用带有 appsearch docker 图像的弹性搜索,在 localhost 上一切正常,但是当我尝试使用 nginx 托管图像和路由时,appsearch 继续路由到 localhost:3002 而不是主机 Z572D4E421E5E6B29BC11E

Dockercompose file Dockercompose 文件

version: '2'
services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.3.0
    environment:
    - "node.name=es-node"
    - "discovery.type=single-node"
    - "cluster.name=app-search-docker-cluster"
    - "bootstrap.memory_lock=true"
    - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
  appsearch:
    image: docker.elastic.co/app-search/app-search:7.3.0
    environment:
    - "elasticsearch.host=http://elasticsearch:9200"
    - "allow_es_settings_modification=true"
    - "JAVA_OPTS=-Xmx256m"
    - "SERVER_HOST=https://mywebsite.com"
    ports:
    - 3002:3002

using reverse proxy on nginx from mywebsite.com to localhost:3002 everytime i access mywebsite.com, it redirects to localhost:3002, any solution?在 nginx 上使用反向代理从 mywebsite.com 到 localhost:3002 每次我访问 mywebsite.com 时,它会重定向到 localhost:302,任何解决方案?

changed SERVER_HOST to app_search.external_url all is working good nowSERVER_HOST更改为app_search.external_url现在一切正常

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM