43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
# 2023-09-25
|
|
# Stack: promtail
|
|
---
|
|
|
|
promtail:
|
|
name: "promtail"
|
|
tasks:
|
|
- promtail.yml
|
|
ipv6: true
|
|
|
|
directories:
|
|
- "{{ stack_folder_conf }}/promtail/conf"
|
|
- "{{ stack_folder_datas }}/promtail/datas"
|
|
|
|
services:
|
|
|
|
- name: "promtail"
|
|
image: "grafana/promtail:latest"
|
|
uid: "0"
|
|
gid: "0"
|
|
privileged: true
|
|
capabilities:
|
|
- DAC_OVERRIDE
|
|
restart: "always"
|
|
ports:
|
|
- { exposed: "${VM_PORT_PROMTAIL}", container: "1514" }
|
|
commands:
|
|
- "-config.expand-env=true"
|
|
- "-config.file=/etc/promtail/promtail.yml"
|
|
healthcheck: 'promtail -version || exit 1'
|
|
environment:
|
|
- { name: "VM_NAME", value: "${VM_NAME}" }
|
|
- { name: "MASTER_HOST", value: "${MASTER_HOST}" }
|
|
- { name: "VM_PORT_LOKI", value: "${VM_PORT_LOKI}" }
|
|
ressources:
|
|
cpus: "2.0"
|
|
memory: 1G
|
|
tmpfs: 512M
|
|
volumes:
|
|
- { local: './{{ stack_folder_conf }}/promtail/conf', container: '/etc/promtail', mode: 'ro' }
|
|
- { local: './{{ stack_folder_datas }}/promtail/datas', container: '/datas', mode: 'rw' }
|
|
- { local: '/var/log', container: '/var/log', mode: 'ro' }
|