Created
March 18, 2026 08:59
-
-
Save fudongyingluck/6cb5e7984f535ac5b3831a55012c9503 to your computer and use it in GitHub Desktop.
grafana 容器配置
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Grafana - Metrics visualization | |
| # Usage: add -f docker-compose.grafana.yml to your docker compose command | |
| # | |
| # Example: | |
| # docker compose -f docker-compose.yml -f docker-compose.grafana.yml up -d | |
| services: | |
| grafana: | |
| image: grafana/grafana:${GRAFANA_IMAGE_VERSION:-11.4.0} | |
| container_name: grafana | |
| entrypoint: | |
| - /bin/sh | |
| - -c | |
| - | | |
| grafana-cli plugins install grafana-opensearch-datasource | |
| exec /run.sh | |
| ports: | |
| - "${GRAFANA_PORT:-3000}:3000" | |
| environment: | |
| - GF_SECURITY_ADMIN_USER=${GRAFANA_ADMIN_USER:-admin} | |
| - GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD:-My_password_123!@#} | |
| - GF_AUTH_ANONYMOUS_ENABLED=true | |
| - GF_AUTH_ANONYMOUS_ORG_ROLE=Viewer | |
| - GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=grafana-opensearch-datasource | |
| volumes: | |
| - grafana-data:/var/lib/grafana | |
| - ./datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml | |
| networks: | |
| - observability-stack-network | |
| restart: unless-stopped | |
| deploy: | |
| resources: | |
| limits: | |
| memory: 256M | |
| volumes: | |
| grafana-data: | |
| driver: local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment