docker-compose configuration
For the configuration and installation of docker-compose, you can refer to this note of mine: Docker-compose installation configuration explanation
Create a docker-compose.yml configuration file
version: '3'
services:
prometheus:
image: prom/prometheus:v2.30.3
container_name: prometheus
deploy:
resources:
limits:
cpus: '0.8'
memory: 12G
ports:
- 9090:9090
privileged: true
volumes:
- /data/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- /data/prometheus/data:/prometheus
- /app/ca/server/server.crt:/etc/prometheus/server.crt
- /app/ca/server/server.key:/etc/prometheus/server.key
- /app/ca/root/ca.crt:/etc/prometheus/ca.crt
- /data/prometheus/rules:/etc/prometheus/rules
- /data/prometheus/web-config.yml:/etc/prometheus/web-config.yml
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro