添加 docker-compose/prometheus/promtheus/prometheus.yaml
This commit is contained in:
24
docker-compose/prometheus/promtheus/prometheus.yaml
Normal file
24
docker-compose/prometheus/promtheus/prometheus.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
prometheus:
|
||||
image: prom/prometheus:v3.5.1
|
||||
container_name: prometheus
|
||||
restart: always
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
- '--web.enable-lifecycle'
|
||||
- '--storage.tsdb.retention.time=30d'
|
||||
volumes:
|
||||
- ./config/prometheus.yml:/etc/prometheus/prometheus.yml
|
||||
- ./config/rules/:/etc/prometheus/rules/
|
||||
- ./config/targets/:/etc/prometheus/targets/
|
||||
- ./data:/prometheus
|
||||
ports:
|
||||
- "9090:9090"
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1'
|
||||
memory: 1G
|
||||
Reference in New Issue
Block a user