Files
docker-elk/extensions/filebeat/filebeat-compose.yml
Antoine Cotten 24306fd49d feat!: Remove support for Compose v1
There has been no release of the deprecated 'docker-compose' Python
package since v1.29.2, which was published in May 2021[1]. This release
is currently broken due to a breaking change in the 'docker' Python
package at version 7.0.0[1], and there is seemlingly no plan to release
a patch version of Compose v1 to address the problem.

The official path forward is to use Compose v2, which is now bundled
with the Docker client and available on all platforms where Docker is
supported.

This commit additionally removes the 'version' attribute from Compose
files, since it was obsoleted in the Compose Spec[3].

Closes #1017

[1]: https://pypi.org/project/docker-compose/#history
[2]: docker/docker-py#3194
[3]: https://compose-spec.io
2024-09-17 09:20:56 +02:00

34 lines
1.1 KiB
YAML

services:
filebeat:
build:
context: extensions/filebeat/
args:
ELASTIC_VERSION: ${ELASTIC_VERSION}
# Run as 'root' instead of 'filebeat' (uid 1000) to allow reading
# 'docker.sock' and the host's filesystem.
user: root
command:
# Log to stderr.
- -e
# Disable config file permissions checks. Allows mounting
# 'config/filebeat.yml' even if it's not owned by root.
# see: https://www.elastic.co/guide/en/beats/libbeat/current/config-file-permissions.html
- --strict.perms=false
volumes:
- ./extensions/filebeat/config/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro,Z
- type: bind
source: /var/lib/docker/containers
target: /var/lib/docker/containers
read_only: true
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock
read_only: true
environment:
FILEBEAT_INTERNAL_PASSWORD: ${FILEBEAT_INTERNAL_PASSWORD:-}
BEATS_SYSTEM_PASSWORD: ${BEATS_SYSTEM_PASSWORD:-}
networks:
- elk
depends_on:
- elasticsearch