NatLibFi / Annif

Annif is a multi-algorithm automated subject indexing tool for libraries, archives and museums.
https://annif.org
Other
197 stars 41 forks source link

maui backend with docker-compose: nginx #473

Closed runnwerth closed 3 years ago

runnwerth commented 3 years ago

When using docker-compose in order to set up the maui backend, there seems to be an issue: Instead of creating the file /annif/nginx/nginx.conf with the following content

upstream upstream_servers {
    server gunicorn_server:8000;
}

server {
    listen 80;
    server_name localhost;

    location / {
        proxy_pass http://upstream_servers;
    }
}

an empty directory is created.

juhoinkinen commented 3 years ago

I assume you are using the docker-compose.yml file provided in Annif repository? Using it the nginx.conf should get mounted from the host system to the container at line 36.

Now I see that if the nginx.conf is not present in the expected directory annif/nginx/, an empty directory is created there, and NGINX won't start but an error ERROR: Encountered errors while bringing up the project is printed.

If you don't need/want to pull the whole Annif repository, you could just get the nginx.conf and put it to the same directory as the docker-compose.yml and drop the directory part of the mount path on the host. (This should be explained better in the Wiki, or maybe there could be simpler way to insert to NGINX configuration.)

Note also that NGINX container is not really needed if you just want to use Maui backend; the NGINX section can be removed from the docker-compose.yml.

osma commented 3 years ago

I'm assuming the problem was sorted out and closing this issue - please reopen if necessary.

Note that Maui is being replaced by MLLM - see this post on annif-users.