Build: Added devenv docker block for testing grafana with traefik.

This commit is contained in:
Marcus Andersson 2020-01-27 11:29:04 +01:00 committed by GitHub
parent 8f2f07cabf
commit f46ee12364
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 56 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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