mirror of
https://github.com/BgaSol/sol-cloud
synced 2026-04-21 17:17:16 +00:00
- Add the configuration user: root in the Prometheus service - Address data persistence issues caused by insufficient permissions - Ensure the container can properly access the mounted configuration files and data directories
84 lines
No EOL
2.4 KiB
YAML
84 lines
No EOL
2.4 KiB
YAML
networks:
|
|
cloud-app:
|
|
external: true
|
|
services:
|
|
# 收集postgresql信息
|
|
cloud-monitor-postgres:
|
|
image: quay.io/prometheuscommunity/postgres-exporter:latest
|
|
environment:
|
|
DATA_SOURCE_URI: cloud-app-postgres:5432?sslmode=disable
|
|
DATA_SOURCE_USER: ${POSTGRES_USER}
|
|
DATA_SOURCE_PASS: ${POSTGRES_PASSWORD}
|
|
ports:
|
|
- "9187:9187"
|
|
networks:
|
|
- cloud-app
|
|
# 收集redis信息
|
|
cloud-monitor-redis:
|
|
image: oliver006/redis_exporter:latest
|
|
ports:
|
|
- "9121:9121"
|
|
environment:
|
|
REDIS_ADDR: cloud-app-redis:6379
|
|
REDIS_PASSWORD: ${REDIS_PASSWORD}
|
|
networks:
|
|
- cloud-app
|
|
# 收集后端日志信息
|
|
cloud-monitor-grafana-loki:
|
|
image: grafana/loki:latest
|
|
command: >
|
|
-config.file=/etc/loki/local-config.yaml
|
|
-config.expand-env=true
|
|
environment:
|
|
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
|
|
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
|
|
volumes:
|
|
- ./config/loki/local-config.yaml:/etc/loki/local-config.yaml:ro
|
|
ports:
|
|
- "3100:3100"
|
|
restart: unless-stopped
|
|
networks:
|
|
- cloud-app
|
|
# 收集后端链路信息
|
|
cloud-monitor-grafana-tempo:
|
|
image: grafana/tempo:latest
|
|
command: >
|
|
-config.file=/etc/tempo/tempo.yml
|
|
-storage.trace.s3.access_key=$MINIO_ROOT_USER
|
|
-storage.trace.s3.secret_key=$MINIO_ROOT_PASSWORD
|
|
environment:
|
|
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
|
|
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
|
|
volumes:
|
|
- ./config/tempo/tempo.yml:/etc/tempo/tempo.yml:ro
|
|
ports:
|
|
- "3200:3200"
|
|
- "4317:4317"
|
|
- "4318:4318"
|
|
restart: unless-stopped
|
|
networks:
|
|
- cloud-app
|
|
cloud-monitor-prometheus:
|
|
image: prom/prometheus:latest
|
|
user: root
|
|
volumes:
|
|
- ./config/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
|
- ./data/prometheus:/prometheus
|
|
ports:
|
|
- "9090:9090"
|
|
networks:
|
|
- cloud-app
|
|
cloud-monitor-grafana:
|
|
image: grafana/grafana:latest
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- GF_USERS_DEFAULT_LANGUAGE=zh-Hans
|
|
- GF_SECURITY_ADMIN_PASSWORD=grafanapwd
|
|
- GF_SECURITY_ADMIN_USER=grafana
|
|
- GF_DASHBOARDS_DEFAULT_HOME_DASHBOARD_PATH=/var/lib/grafana/dashboards/home/home.json
|
|
volumes:
|
|
- ./config/grafana/provisioning:/etc/grafana/provisioning:ro
|
|
- ./config/grafana/dashboards:/var/lib/grafana/dashboards:ro
|
|
networks:
|
|
- cloud-app |