diff --git a/devenv/docker/blocks/traefik/configs/subpath_no_rewrite.yml b/devenv/docker/blocks/traefik/configs/subpath_no_rewrite.yml new file mode 100644 index 00000000000..aa238587805 --- /dev/null +++ b/devenv/docker/blocks/traefik/configs/subpath_no_rewrite.yml @@ -0,0 +1,19 @@ +http: + middlewares: + compress-response: + compress: {} + + services: + grafana-subpath: + loadBalancer: + servers: + - url: 'http://grafana-subpath:3000/' + + routers: + grafana-subpath: + entryPoints: + - web + middlewares: + - compress-response + rule: 'Path(`/grafana`) || PathPrefix(`/grafana/`)' + service: grafana-subpath diff --git a/devenv/docker/blocks/traefik/docker-compose.yml b/devenv/docker/blocks/traefik/docker-compose.yml new file mode 100644 index 00000000000..e62805a37f5 --- /dev/null +++ b/devenv/docker/blocks/traefik/docker-compose.yml @@ -0,0 +1,19 @@ +version: '3' + +services: + traefik: + image: traefik:v2.1 + volumes: + - './traefik.yml:/etc/traefik/traefik.yml' + - './configs:/etc/traefik/configs' + ports: + - '80:80' + - '8080:8080' + links: + - grafana-subpath + + grafana-subpath: + image: grafana/grafana:latest + environment: + - GF_SERVER_ROOT_URL=/grafana + - GF_SERVER_SERVE_FROM_SUB_PATH=true diff --git a/devenv/docker/blocks/traefik/traefik.yml b/devenv/docker/blocks/traefik/traefik.yml new file mode 100644 index 00000000000..e160cd390da --- /dev/null +++ b/devenv/docker/blocks/traefik/traefik.yml @@ -0,0 +1,18 @@ +## traefik.yml + +# Entrypoints enabled +entryPoints: + web: + address: ':80' + +# API and dashboard configuration +api: + insecure: true + +# Loggings +log: {} + +# File configurations folder +providers: + file: + directory: /etc/traefik/configs