Replies: 1 comment 2 replies
-
AFAICS It may still be valuable to have an optional |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hopefully this is more a question than a feature request: I am trying to integrate Martin using Docker (Compose) with a Traefik proxy front-end. From the documentation I understand how this is realised with Nginx but somehow I can't get this scenario to work with Traefik. Connection to DB is ok. Problem: the returned TileJSON contains the external host+port but not the sub-path. This image should make the problem somewhat clearer:
Traefik runs here at
http://localhost:8000
(or in production on HTTPS, Martin in Docker Container on0.0.0.0:3000
). So the externalprotocol://host:port
is handled ok. Here the subpath is/vt
. As you can see in the TileJSON, that subpath is not present. This is a recurring problem with proxied services. For example in Python Flask apps one can set an env varSCRIPT_NAME
, and there are many other 'tricks' or mostly config settings likeBasePath
, but via HTTP Headers is more elegant.In the Nginx setup it looks like a HTTP Header
X-Rewrite-URL
does the trick, but can't find an equivalent setting for Traefik. As Traefik is a widely used frontend, IMHO it is useful to figure out, maybe even extend the Martin config, or at least extend the docs how to setup with Traefik.My Docker Compose file is like (with some env vars like
SERVICE_NAME=martin
), so the prefix path to themartin
container is/vt
, which is stripped before forwarding to the martin Container:Beta Was this translation helpful? Give feedback.
All reactions