# 2023-09-26 # 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: cpu: "{{ vm_os_cpu_max }}" memory: "{{ 1.0 if 1.0 <= vm_os_memory_max|float else vm_os_memory_max|float }}G" 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' }