Issue using maps from a docker container using docker-compose

I had a metabase installation on a docker-compose.

In compose I define db, metabase and web. web is a httpd-alphine used for custom geojson maps, so i can use them in local.

Maps in docker compose are reached correctly from another metabase instance but not from the one installed in same docker-compose.

Loading map with url:

http://web:81/europe.geojson

When i click load, i recieve the message:

Connessione rifiutata dallhost per URL {0}

Detailed log tell me this:

metabase_1 | 05-31 22:25:13 ERROR middleware.log :: PUT /api/setting/custom-geojson 500 5,7 ms (0 DB calls)
metabase_1 | {:via
metabase_1 | [{:type java.lang.Exception, :message "Connessione rifiutata dallhost per URL {0}", :at [metabase.api.geojson$valid_json_url_string_QMARK_ invokeStatic “geojson.clj” 69]}
metabase_1 | {:type java.net.ConnectException, :message “Connection refused (Connection refused)”, :at [java.net.PlainSocketImpl socketConnect nil -2]}],
metabase_1 | :trace
metabase_1 | [[java.net.PlainSocketImpl socketConnect nil -2]
metabase_1 | [java.net.AbstractPlainSocketImpl doConnect nil -1]
metabase_1 | [java.net.AbstractPlainSocketImpl connectToAddress nil -1]
metabase_1 | [java.net.AbstractPlainSocketImpl connect nil -1]
metabase_1 | [java.net.Socket connect nil -1]
metabase_1 | [java.net.Socket connect nil -1]
metabase_1 | [sun.net.NetworkClient doConnect nil -1]
metabase_1 | [sun.net.www.http.HttpClient openServer nil -1]
metabase_1 | [sun.net.www.http.HttpClient openServer nil -1]
metabase_1 | [sun.net.www.http.HttpClient nil -1]
metabase_1 | [sun.net.www.http.HttpClient New nil -1]
metabase_1 | [sun.net.www.http.HttpClient New nil -1]
metabase_1 | [sun.net.www.protocol.http.HttpURLConnection getNewHttpClient nil -1]
metabase_1 | [sun.net.www.protocol.http.HttpURLConnection plainConnect0 nil -1]
metabase_1 | [sun.net.www.protocol.http.HttpURLConnection plainConnect nil -1]
metabase_1 | [sun.net.www.protocol.http.HttpURLConnection connect nil -1]
metabase_1 | [sun.net.www.protocol.http.HttpURLConnection getInputStream0 nil -1]
metabase_1 | [sun.net.www.protocol.http.HttpURLConnection getInputStream nil -1]
metabase_1 | [java.net.URL openStream nil -1]
metabase_1 | [clojure.java.io$fn__11500 invokeStatic “io.clj” 239]
metabase_1 | [clojure.java.io$fn__11500 invoke “io.clj” 235]
metabase_1 | [clojure.java.io$fn__11409$G__11402__11416 invoke “io.clj” 69]
metabase_1 | [clojure.java.io$fn__11508 invokeStatic “io.clj” 256]
metabase_1 | [clojure.java.io$fn__11508 invoke “io.clj” 254]
metabase_1 | [clojure.java.io$fn__11409$G__11402__11416 invoke “io.clj” 69]
metabase_1 | [clojure.java.io$fn__11470 invokeStatic “io.clj” 165]
metabase_1 | [clojure.java.io$fn__11470 invoke “io.clj” 165]
metabase_1 | [clojure.java.io$fn__11422$G__11398__11429 invoke “io.clj” 69]
metabase_1 | [clojure.java.io$reader invokeStatic “io.clj” 102]
metabase_1 | [clojure.java.io$reader doInvoke “io.clj” 86]
metabase_1 | [clojure.lang.RestFn invoke “RestFn.java” 410]
metabase_1 | [metabase.api.geojson$valid_json_QMARK_$fn__56467$fn__56468 invoke “geojson.clj” 30]
metabase_1 | [metabase.util$do_with_timeout$fn__9213 invoke “util.clj” 310]
metabase_1 | [clojure.core$binding_conveyor_fn$fn__5754 invoke “core.clj” 2030]
metabase_1 | [clojure.lang.AFn call “AFn.java” 18]
metabase_1 | [java.util.concurrent.FutureTask run nil -1]
metabase_1 | [java.util.concurrent.ThreadPoolExecutor runWorker nil -1]
metabase_1 | [java.util.concurrent.ThreadPoolExecutor$Worker run nil -1]
metabase_1 | [java.lang.Thread run nil -1]],
metabase_1 | :cause “Connection refused (Connection refused)”,
metabase_1 | :message "Connessione rifiutata dallhost per URL {0}",
metabase_1 | :type java.lang.Exception}
metabase_1 |

Finally this is my docker-compose.yml

  version: '3'

  services:

  db:
	image: mariadb:latest
	restart: always
	volumes:
	  - "./mysql-data:/var/lib/mysql"
	ports:
	  - "3306:3306"
	environment:
	  - MYSQL_DATABASE=*
	  - MYSQL_USER=*
	  - MYSQL_PASSWORD=*
	  - MYSQL_ROOT_PASSWORD=*
	networks:
	  - metabase

  web:
	image: httpd:alpine
	restart: always
	volumes:
	  - "./httpd-data/:/usr/local/apache2/htdocs/"
	ports:
	  - "81:80"
	networks:
	  - metabase

  metabase:
	image: metabase/metabase:latest
	restart: always
	volumes:
	  - "./metabase-data:/metabase-data"
	ports:
	  - "3333:3000"
	environment:
	  # - MB_DB_FILE=./metabase-data
	  - MB_DB_TYPE=mysql

I really don’t know if its a issue in compose config (i think not, cause the map is correctly loaded from another machine, and from metabase docker i rech web container with no prolbem), or an issue of metabase.

Hi @Pietro
Remember expose and/or bridge.
You’ll find better help in a forum for Docker, since this has nothing to do with Metabase.