vivo-project / VIVO

VIVO is an extensible semantic web application for research discovery and showcasing scholarly work
http://vivoweb.org
BSD 3-Clause "New" or "Revised" License
202 stars 127 forks source link

Add bind address option to .env docker-compose #3939

Closed isl3 closed 3 months ago

isl3 commented 5 months ago

As far as I can tell the docker compose will always bind to 0.0.0.0:8983 and 0.0.0.0:8080 respectfully, this causes me trouble as I am trying to run vivo behind a reverse proxy and not expose solr to the entire network.

Please the option to configure what address the containers or the network binds to on the host system.

My current work around is to edit the docker compose before running docker compose up -d as follows.

  solr:
    image: vivoweb/vivo-solr:latest
    environment:
      - RESET_CORE=${RESET_CORE}
      - VERBOSE=${VERBOSE}
    ports:
      - "127.0.0.1:8983:8983"
    networks:
      - vivo

  tomcat:
   .....
    ports:
      - "127.0.0.1:8080:8080"
chenejac commented 5 months ago

@isl3 thanks for reporting this. @wwelling created a PR which should address your issue. It would be great if you can test the solution provided by William and report us back if that is in accordance with your expectations and needs.

isl3 commented 5 months ago

I've tested the PR and it works as I would expect it to, thank you for the quick work. It might be helpful to some there was a comment somewhere saying VIVO_HOST_PORT/SOLR_HOST_PORT can also specify host IP, but this should be obvious to anyone who knows how docker-compose files work so not an large concern.

chenejac commented 4 months ago

@isl3 thanks for confirmation. Can you please review PR and approve it in the case it is working for you? Moreover, you can post your comment there. If @wwelling finds that reasonable he might consider to include that in the PR. Thank you in advance.