Attachment server unavailable in all-in-one Specify-7 docker-compose setup on Windows

  1. I’m using port 8090 so…

http://localhost:8090/web_asset_store.xml returns this:

<?xml version="1.0" encoding="UTF-8"?>
<urls>
    <url type="read"><![CDATA[http://host.docker.internal:80/fileget]]></url>
    <url type="write"><![CDATA[http://host.docker.internal:80/fileupload]]></url>
    <url type="delete"><![CDATA[http://host.docker.internal:80/filedelete]]></url>
    <url type="getmetadata"><![CDATA[http://host.docker.internal:80/getmetadata]]></url>
    <url type="testkey">http://host.docker.internal:80/testkey</url>
</urls>

http://host.docker.internal/web_asset_store.xml returns the same thing as above.

I’m on Windows so I modified the file C:\Windows\System32\drivers\etc\hosts … here is a copy of it…

# Added by Docker Desktop
132.156.208.198 host.docker.internal
132.156.208.198 gateway.docker.internal

#Added for Specify7 (Docker) by Heryk
127.0.0.1 host.docker.internal
  1. Here is a copy of the nginx config I’m using… I have not modified it.
server {
    listen 80;
    server_name localhost;
    root /usr/share/nginx;

    # serve static files directly
    location /static/ {
        root /volumes;
        rewrite ^/static/config/(.*)$ /specify6/config/$1 break;
        rewrite ^/static/depository/(.*)$ /static-files/depository/$1 break;
        rewrite ^/static/(.*)$ /static-files/frontend-static/$1 break;
    }

    # proxy these urls to the asset server
    location ~ ^/(fileget|fileupload|filedelete|getmetadata|testkey|web_asset_store.xml) {
        client_max_body_size 0;
        resolver 127.0.0.11 valid=30s;
        set $backend "http://asset-server:8080";
        proxy_pass $backend;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

    # proxy everything else to specify 7
    location / {
        resolver 127.0.0.11 valid=30s;
        set $backend "http://specify7:8000";
        proxy_pass $backend;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

Thanks for your help!