diff --git a/docker-compose/prometheus/promtheus/prometheus.yaml b/docker-compose/prometheus/promtheus/prometheus.yaml new file mode 100644 index 0000000..1493126 --- /dev/null +++ b/docker-compose/prometheus/promtheus/prometheus.yaml @@ -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 \ No newline at end of file