24 lines
628 B
YAML
24 lines
628 B
YAML
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 |