File size: 986 Bytes
570f7bd
 
 
 
666306b
570f7bd
 
 
 
 
666306b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
570f7bd
666306b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
services:
  api:
    environment:
      POSTGRES_DSN: dbname=demo user=postgres password=postgres host=postgres port=5432
      OPENAI_MODEL: gpt-4o-mini
      OPENAI_API_KEY: ${OPENAI_API_KEY}
    ports:
      - "8000:8000"
    command: ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--proxy-headers"]

  prometheus:
    image: prom/prometheus:latest
    container_name: prometheus
    restart: unless-stopped
    ports:
      - "9090:9090"
    volumes:
      # πŸ“˜ Prometheus config
      - ./provisioning/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
      # πŸ“˜ Rules (recording + alert rules)
      - ./provisioning/prometheus/rules.yml:/etc/prometheus/rules.yml:ro
      # πŸ“˜ Persistent TSDB storage
      - prometheus_data:/prometheus
    command:
      - "--config.file=/etc/prometheus/prometheus.yml"
      - "--storage.tsdb.path=/prometheus"
      - "--web.enable-lifecycle"
      - "--web.enable-admin-api"

volumes:
  prometheus_data: