add example of docker-compose with traefik proxy (#763)

This commit is contained in:
Rustam Gimadiev 2021-08-03 12:20:53 +03:00 committed by GitHub
parent 96d07a7d6f
commit 9770ad47af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 38 additions and 0 deletions

View file

@ -0,0 +1,27 @@
---
version: '3.8'
services:
traefik:
restart: always
image: traefik:v2.4
container_name: traefik
command:
- --api.insecure=true
- --providers.file.directory=/etc/traefik
- --providers.file.watch=true
- --entrypoints.web.address=:80
- --log.level=debug
ports:
- 80:80
volumes:
- ./traefik:/etc/traefik
kafka-ui:
container_name: kafka-ui
image: provectuslabs/kafka-ui:latest
ports:
- 8082:8080
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:9092
SERVER_SERVLET_CONTEXT_PATH: /kafka-ui

View file

@ -0,0 +1,11 @@
http:
routers:
kafkaui:
rule: "PathPrefix(`/kafka-ui/`)"
entrypoints: web
service: kafkaui
services:
kafkaui:
loadBalancer:
servers:
- url: http://kafka-ui:8080