services:
init:
image: &tempoImage grafana/tempo:latest
container_name: init
user: root
entrypoint:
- "chown"
- "10001:10001"
- "/var/tempo"
volumes:
- tempo-data:/var/tempo
deploy:
resources:
limits:
cpus: '1'
memory: '1024M'
reservations:
cpus: '0.5'
memory: '512M'
networks:
- monitoring
tempo:
image: *tempoImage
container_name: tempo
command: [ "-config.file=/etc/tempo.yaml" ]
volumes:
- ./tempo.yaml:/etc/tempo.yaml
- tempo-data:/var/tempo
ports:
- "3200:3200"
- "4317:4317"
- "4318:4318"
deploy:
resources:
limits:
cpus: '1'
memory: '1024M'
reservations:
cpus: '0.5'
memory: '512M'
depends_on:
- init
networks:
- monitoring
otel-collector:
image: otel/opentelemetry-collector:0.86.0
container_name: otel-collector
ports:
- "4317:4317"
- "4318:4318"
command: [ "--config=/etc/otel-collector.yaml" ]
volumes:
- ./otel-collector.yaml:/etc/otel-collector.yaml
deploy:
resources:
limits:
cpus: '1'
memory: '1024M'
reservations:
cpus: '0.5'
memory: '512M'
networks:
- monitoring
prometheus:
image: prom/prometheus:latest
container_name: prometheus
restart: unless-stopped
volumes:
- ./prometheus.yaml:/etc/prometheus/prometheus.yaml
- prometheus-data:/prometheus
command:
- --config.file=/etc/prometheus/prometheus.yaml
- --storage.tsdb.path=/prometheus
- --web.console.libraries=/etc/prometheus/console_libraries
- --web.console.templates=/etc/prometheus/consoles
- --web.enable-remote-write-receiver
- --enable-feature=exemplar-storage
- --enable-feature=native-histograms
- --web.enable-lifecycle
deploy:
resources:
limits:
cpus: '0.5'
memory: '1G'
reservations:
cpus: '0.25'
memory: '512M'
networks:
- monitoring
grafana:
image: grafana/grafana-enterprise:latest
container_name: grafana
volumes:
- ./grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml
- grafana-data:/var/lib/grafana
deploy:
resources:
limits:
cpus: '1'
memory: '1024M'
reservations:
cpus: '0.5'
memory: '512M'
ports:
- "3000:3000"
networks:
- monitoring
volumes:
tempo-data:
grafana-data:
networks:
monitoring:
name: monitoring
driver: bridge