diff options
| author | Fuwn <[email protected]> | 2026-02-26 17:25:56 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-26 17:25:56 -0800 |
| commit | dafb20892bb27af03d449e6b19d782022c884349 (patch) | |
| tree | fadc6301cb00eaaa21d16041fc82dd885d911658 /docker-compose.yml | |
| parent | chore: normalize docker compose formatting (diff) | |
| download | plutia-test-dafb20892bb27af03d449e6b19d782022c884349.tar.xz plutia-test-dafb20892bb27af03d449e6b19d782022c884349.zip | |
chore: add prometheus scrape configuration
Diffstat (limited to 'docker-compose.yml')
| -rw-r--r-- | docker-compose.yml | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/docker-compose.yml b/docker-compose.yml index ed5c6c0..5009c56 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,19 +24,11 @@ services: PLUTIA_MIRROR_PRIVATE_KEY_PATH: ${MIRROR_PRIVATE_KEY_PATH:-/var/lib/plutia/mirror.key} ports: - "8080:8080" - # - job_name: "plutia" - # static_configs: - # - targets: ["localhost:8080"] - # metrics_path: /metrics volumes: - ./config.default.yaml:/etc/plutia/config.yaml:ro - ./data:/var/lib/plutia healthcheck: - test: - [ - "CMD-SHELL", - "wget -q -O- http://127.0.0.1:8080/health >/dev/null 2>&1 || curl -fsS http://127.0.0.1:8080/health >/dev/null", - ] + test: ["CMD", "wget", "-q", "-O-", "http://127.0.0.1:8080/health"] interval: 30s timeout: 5s retries: 5 @@ -54,3 +46,16 @@ services: max-size: "10m" max-file: "5" restart: unless-stopped + + prometheus: + image: prom/prometheus:latest + command: + - "--config.file=/etc/prometheus/prometheus.yml" + - "--storage.tsdb.path=/prometheus" + - "--storage.tsdb.retention.time=7d" + volumes: + - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro + - ./prometheus-data:/prometheus + ports: + - "9090:9090" + restart: unless-stopped |