Deploying ArkIndex locally with docker compose

Hello Teklia team,

I’m trying to deploy Arkindex locally using docker compose approach.
I went through the documentation however the basic idea of running the docker compose right after the git clone is not working so I went around the development env setup and did slight modifiation.

I ran docker/ssl/ark-cert.pem so that I have a local generated cert that is then used for deployment. I have ran the commands :

docker exec ark-backend arkindex migrate
docker exec ark-backend arkindex bootstrap
docker exec ark-backend arkindex createsuperuser

The frontend is coming up alright and I’m able to upload images, I can see everything on minio as well. The place where I have an issue is when running the import_files process, the runners or backend (not clear to me yet) is failing
with comments like :
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘ark.localhost’, port=443): Max retries exceeded with url: /api/v1/openapi/?format=json (Caused by NameResolutionError(“<urllib3.connection.HTTPSConnection object at 0x7fa13dda10d0>: Failed to resolve ‘ark.localhost’ ([Errno -2] Name or service not known)”))

My current guess is that the worker doesn’t know the backend certificate and just rejects it or some local DNS issue, would you have some hints on the matter ?

I’m able to access the openapi file from the browser without issues, meaning it must be runnign fine

Bests
Matthieu

Hello Matthieu,

Given the error, it’s a DNS issue: the worker running inside a docker container cannot reach your backend as ark.localhost.

From your host compputer, can you reach the backend using that DNS ?
A good test is:

curl https://ark.localhost/api/v1/corpus/

It should render a JSON list of corpus.

If that works, you can do the same test from a container:

docker run -it curlimages/curl https://ark.localhost/api/v1/corpus/

Does it give the same output ?


Out of curiosity, what did not work in the make stack command to fully run a docker stack ?

Hello Bastien,

I did not try make stack before, I tried right now and it brought me to the same stage as the docker compose.

Indeed the curl call is failing from cmd or wsl but working from the browser which leaves me wondering wether this has to do with my local config.


In the end the only thing I needed the make file for was conveniently generating the ssl certificate for running the docker compose.

Indeed changing my host file in C:\Windows\System32\drivers\etc to add ark.locahost and minio.ark.localhost solved the problem and I could import the file.

I’m not sure this is a viable solution long term but it let’s me give a try to the solution at least