Files
dropshell-templates/logserver/docker-compose.yml
Your Name f114773d78
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 40s
swtich from ELK to Loki!
2025-09-20 12:01:25 +12:00

57 lines
1.5 KiB
YAML

version: '3.8'
services:
# Grafana - Simple Web UI
grafana:
image: grafana/grafana:latest
container_name: ${CONTAINER_NAME}_grafana
environment:
- GF_SECURITY_ADMIN_USER=${ADMIN_USER:-admin}
- GF_SECURITY_ADMIN_PASSWORD=${ADMIN_PASSWORD:-changeme}
- GF_USERS_ALLOW_SIGN_UP=false
volumes:
- grafana_data:/var/lib/grafana
- ${CONFIG_PATH}/grafana-datasources.yml:/etc/grafana/provisioning/datasources/datasources.yaml:ro
- ${CONFIG_PATH}/grafana-dashboard.yml:/etc/grafana/provisioning/dashboards/dashboard.yaml:ro
- ${CONFIG_PATH}/dashboards:/var/lib/grafana/dashboards:ro
ports:
- "${WEB_PORT:-3000}:3000"
restart: unless-stopped
depends_on:
- loki
networks:
- loki-net
# Loki - Log storage (not exposed directly)
loki:
image: grafana/loki:latest
container_name: ${CONTAINER_NAME}_loki
volumes:
- loki_data:/loki
- ${CONFIG_PATH}/loki.yaml:/etc/loki/local-config.yaml:ro
command: -config.file=/etc/loki/local-config.yaml
restart: unless-stopped
networks:
- loki-net
# Nginx - Authentication proxy for Loki
nginx:
image: nginx:alpine
container_name: ${CONTAINER_NAME}_nginx
volumes:
- ${CONFIG_PATH}/nginx.conf:/etc/nginx/nginx.conf:ro
- ${CONFIG_PATH}/.htpasswd:/etc/nginx/.htpasswd:ro
ports:
- "${LOKI_PORT:-3100}:80"
restart: unless-stopped
depends_on:
- loki
networks:
- loki-net
networks:
loki-net:
volumes:
grafana_data:
loki_data: