version: '3' services: prometheus: container_name: prometheus image: prom/prometheus command: > --storage.tsdb.path=/prometheus --config.file=/etc/prometheus/prometheus.yml --storage.tsdb.retention.time=30d --storage.tsdb.retention.size=2GB logging: driver: journald options: tag: prometheus restart: unless-stopped ports: - 9090:9090 volumes: - ${PROMETHEUS_CONFIG_FILE_PATH}:/etc/prometheus/prometheus.yml:ro - ${PROMETHEUS_DATA_PATH}:/prometheus:rw