Skip to content

Instantly share code, notes, and snippets.

@lluked
Created April 25, 2022 19:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lluked/438b10a6321ff50feb8d704690a0cafc to your computer and use it in GitHub Desktop.
Save lluked/438b10a6321ff50feb8d704690a0cafc to your computer and use it in GitHub Desktop.
Splunk-Traefik-with-Root-Endpoint
splunk:
conf:
web:
directory: /opt/splunk/etc/system/local
content:
settings:
root_endpoint : /splunk
version: "2.2"
services:
splunk:
image: splunk/splunk
restart: always
cap_add: ['IPC_LOCK']
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
environment:
SPLUNK_START_ARGS: "--accept-license"
SPLUNK_PASSWORD: "changeme"
volumes:
- ./default.yml:/tmp/defaults/default.yml
networks:
- splunk
ports:
- "8000:8000"
traefik:
image: "traefik:2.7"
restart: always
volumes:
- ./splunk_dynamic.yml:/etc/traefik/conf/splunk_dynamic.yml:ro
- ./traefik.yml:/etc/traefik/traefik.yml:ro
networks:
- splunk
ports:
- "80:80"
- "443:443"
networks:
splunk:
http:
routers:
splunk:
entryPoints:
- websecure
rule: PathPrefix(`/splunk`)
service: splunk-service
tls: {}
services:
splunk-service:
loadBalancer:
servers:
- url: "http://splunk:8000"
entryPoints:
web:
address: ":80"
http:
redirections:
entrypoint:
to: websecure
scheme: https
websecure:
address: ":443"
providers:
file:
directory: "/etc/traefik/conf"
log:
filePath: "/var/log/traefik.json"
format: json
accessLog:
filePath: "/var/log/access.log"
filters:
statusCodes:
- "401"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment