version: '3.9'
services:
  prometheus:
    user: {{ prometheus_uid }}:{{ prometheus_gid }}
    image: {{ _podman_image }}
    container_name: prometheus
    restart: unless-stopped
    volumes:
      - type: bind
        source: {{ _config_directory }}
        target: /etc/prometheus
      - type: bind
        source: {{ _db_directory }}
        target: /data
    command:
      - '--config.file=/etc/prometheus/prometheus.yml'
      - '--storage.tsdb.path=/data'
      - '--web.console.libraries=/usr/share/prometheus/console_libraries'
      - '--web.console.templates=/usr/share/prometheus/consoles'
    ports:
      - 9090:9090