我正在使用 docker 使用此链接为我的应用程序网站运行石墨、graphana 和 sitespeed:https ://www.sitespeed.io/documentation/sitespeed.io/performance-dashboard/#up-and-running-in-almost-5 -分钟。
我还可以使用 docker-compose 命令将指标发送到 Graphana。我有几个疑问 -
docker-compose run sitespeed.io https://www.sitespeed.io/ --graphite.host=graphite
- 此命令仅对一个 URL 运行。我如何为多个页面/网址运行它?在 sitespeed 文档中写道,我们可以创建一个 url.txt 文件,其中每个 url 都在新行中,但这不起作用。它说“urls.txt 不存在,文件的路径是否正确?” 这个 url.txt 应该放在哪里才能运行此命令启动容器并停止它。我如何删除这些容器以改善内务管理,因为我将在 crontab 中每小时运行一次。
下面是我从上面的链接下载的 docker-compose.yml
version: '3'
services:
sitespeed.io:
image: sitespeedio/sitespeed.io
command: -V
shm_size: 1g
volumes:
- ./sitespeed-result/:/sitespeed.io/sitespeed-result
grafana:
image: grafana/grafana:6.6.2
depends_on:
- graphite
links:
- graphite
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=******
- GF_SECURITY_ADMIN_USER=******
- GF_AUTH_ANONYMOUS_ENABLED=false
- GF_USERS_ALLOW_SIGN_UP=false
- GF_USERS_ALLOW_ORG_CREATE=true
volumes:
- grafana:/var/lib/grafana
restart: always
graphite:
image: sitespeedio/graphite:1.1.5-12
ports:
- "2003:2003"
- "8080:80"
restart: always
volumes:
# In production you should configure/map these to your container
# Make sure whisper and graphite.db/grafana.db lives outside your containerr
# https://www.sitespeed.io/documentation/sitespeed.io/graphite/#graphite-for-production-important
- whisper:/opt/graphite/storage/whisper
# Download an empty graphite.db from https://github.com/sitespeedio/sitespeed.io/tree/master/docker/graphite
- graphite.db:/opt/graphite/storage/graphite.db
#
# And put the configuration files on your server, configure them as you need
# Download from https://github.com/sitespeedio/docker-graphite-statsd/tree/master/conf/graphite
# - /absolute/path/to/graphite/conf/storage-schemas.conf:/opt/graphite/conf/storage-schemas.conf
# - /absolute/path/to/graphite/conf/storage-aggregation.conf:/opt/graphite/conf/storage-aggregation.conf
# - /absolute/path/to/graphite/conf/carbon.conf:/opt/graphite/conf/carbon.conf
grafana-setup:
image: sitespeedio/grafana-bootstrap:12.1.0
links:
- grafana
environment:
- GF_PASSWORD=******
- GF_USER=******
volumes:
grafana:
whisper: