iodepo / oih-ui

source code for the Ocean InfoHub (OIH) website
https://oceaninfohub.org/
MIT License
5 stars 4 forks source link

Docker based indexing #20

Closed fils closed 1 year ago

fils commented 2 years ago

When running the docker version of the loader I tried

 docker run -ti --rm -v "/data/imports/data:/opt/data" -e "SOLR_URL=http://solr:8983/solr/ckan" 5b4155878485 indexer.py

Where the 5b4.... is my local image build from the Dockerfile. This fails to connect to the solr endpoint

For reference, with the docker ps we see

CONTAINER ID   IMAGE                            COMMAND                  CREATED       STATUS       PORTS                                                      NAMES
a1c284d2ffcd   fils/dagster_oih:0.0.38          "dagster-daemon run"     6 days ago    Up 6 days                                                               oih-dagster-dagster-daemon-1
a21265452938   fils/dagster_oih:0.0.38          "dagit -w workspace.…"   6 days ago    Up 6 days    0.0.0.0:3000->3000/tcp                                     oih-dagster-dagster-dagit-1
d684ba3b6255   postgres:13.3                    "docker-entrypoint.s…"   6 days ago    Up 6 days    0.0.0.0:5432->5432/tcp                                     oih-dagster-dagster-postgres-1
c1a29cd136ed   minio/minio:latest               "/usr/bin/docker-ent…"   6 days ago    Up 6 days    0.0.0.0:54321->54321/tcp, 0.0.0.0:9001->9000/tcp           oih-index-support-s3system-1
a93cff110cbd   nawer/blazegraph                 "docker-entrypoint.s…"   6 days ago    Up 6 days    0.0.0.0:9999->9999/tcp                                     oih-index-support-triplestore-1
6999ce530992   chromedp/headless-shell:latest   "/headless-shell/hea…"   6 days ago    Up 6 days    0.0.0.0:9222->9222/tcp                                     oih-index-support-headless-1
e2be0455ecc5   portainer/portainer-ce           "/portainer"             6 days ago    Up 6 days    0.0.0.0:8000->8000/tcp, 0.0.0.0:9000->9000/tcp, 9443/tcp   portainer
9c682f7c7402   nginxproxy/acme-companion        "/bin/bash /app/entr…"   12 days ago   Up 12 days                                                              oih-ui-docker_letsencrypt-nginx-proxy-companion_1
7e7527e3b758   oih-ui-docker_web                "docker-entrypoint.s…"   12 days ago   Up 12 days                                                              oih-ui-docker_web_1
d84a2a4a6a52   oih-ui-docker_api                "uvicorn api.main:ap…"   12 days ago   Up 12 days   8000/tcp                                                   oih-ui-docker_api_1
b71640a3f34e   nginxproxy/nginx-proxy:latest    "/app/docker-entrypo…"   12 days ago   Up 12 days   0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp                   oih-ui-docker_nginx-proxy_1
d4dfefdbe093   solr:8                           "docker-entrypoint.s…"   12 days ago   Up 12 days                                                              oih-ui-docker_solr_1

The questions are:

Thanks

EricSoroos commented 1 year ago

I think if you're doing this on the docker level (vs docker-compose) you will need to either expose a port to the host (e.g., -p 127.0.0.1:8159:8159) or you'll need to add a --network specification to the docker run command that you're using that will connect your docker container to the network that's in use for the solr container.

docker network ls and docker inspect [containerid] might be useful commands to figure out how to connect them.