1,创建docker-compose.yml文件 vi docker-compose.yml
version: "3"
services:
vmauth:
image: victoriametrics/vmauth:latest
restart: always
ports:
- 8427:8427
volumes:
- /data/vmauth/config.yml:/etc/victoriametrics/config.yml
command:
- '-auth.config=/etc/victoriametrics/config.yml'
2,创建容器并启动
docker-compose -f docker-compose.yml up -d
3,config.yml文件内容:
users:
- username: "prometheus"
password: "prometheus"
url_map:
- src_paths:
- "/api/v1/query"
- "/api/v1/query_range"
- "/api/v1/label/[^/]+/values"
url_prefix:
- "http://10.13