mbtiles file serving using Compose #1237
-
Hi Team, I've generated a martin:
image: ghcr.io/maplibre/martin:v0.13.0
ports:
- 3000:3000
environment:
- RUST_LOG=debug
volumes:
- ../docker/volumes/martin/config.yaml:/config/config.yaml
- ../docker/volumes/martin/belgium.mbtiles:/belgium.mbtiles
command: /mbfiles/belgium.mbtiles # ??? I tried another approach by adding another port mapping in |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
We can't pass a On top of that, we can still specify a database URL ... I don't know what it's doing yet but it's possible. martin:
image: ghcr.io/maplibre/martin:v0.13.0
ports:
- 3000:3000
environment:
- DATABASE_URL=postgresql://martin_pguser:${MARTIN_PGPASSWORD}@postgres/osmdb
- RUST_LOG=debug
volumes:
- ../docker/volumes/martin/fonts:/fonts
- ../docker/volumes/martin/icons:/sprite
- ../docker/volumes/martin/belgium.mbtiles:/belgium.mbtiles
command:/belgium.mbtiles --sprite /sprite --font /fonts Then if we hit {
"tiles": {
"belgium": { <---- HERE
"content_type": "application/x-protobuf",
"content_encoding": "gzip",
"name": "planet_osm_point,planet_osm_line,planet_osm_roads,planet_osm_polygon",
"description": "public.planet_osm_point.way\npublic.planet_osm_line.way\npublic.planet_osm_roads.way\npublic.planet_osm_polygon.way"
},
"planet_osm_line": {
"content_type": "application/x-protobuf",
"description": "public.planet_osm_line.way"
},
"planet_osm_point": {
"content_type": "application/x-protobuf",
"description": "public.planet_osm_point.way"
},
"planet_osm_polygon": {
"content_type": "application/x-protobuf",
"description": "public.planet_osm_polygon.way"
},
"planet_osm_roads": {
"content_type": "application/x-protobuf",
"description": "public.planet_osm_roads.way"
}
},
"sprites": {
"sprite": {
"images": [] // 101 items
}
},
"fonts": {
"Noto Sans Bold": {},
"Noto Sans Italic": {},
"Noto Sans Light": {},
"Noto Sans Regular": {}
}
}
|
Beta Was this translation helpful? Give feedback.
-
If you are using a config file, I would recommend passing all of your sources via that - e.g. in your config add mbtiles section as described here (scroll to the |
Beta Was this translation helpful? Give feedback.
If you are using a config file, I would recommend passing all of your sources via that - e.g. in your config add mbtiles section as described here (scroll to the
mbtiles:
). Otherwise Martin has to combine configuration files and CLI params - which it does not allow in some cases.