another one! closes #15 again, the compose-snippet was generated using Claude, but verified and tested manually. Thought of using a socket-proxy just as traefik does, but since alloy has socket access anyways and the official docker image should be as safe as it gets, I think this should be alright. ## Loki log preview  Reviewed-on: #32 Reviewed-by: moritz <98+moritz@noreply.git.coopcloud.tech> Co-authored-by: Simon <s.thiessen@local-it.org>
20 lines
486 B
YAML
20 lines
486 B
YAML
version: "3.8"
|
|
services:
|
|
docker-events:
|
|
image: docker:29.8.1-cli
|
|
command: >
|
|
docker events
|
|
--format '{{json .}}'
|
|
--filter type=container
|
|
--filter event=start
|
|
--filter event=die
|
|
--filter event=kill
|
|
--filter event=oom
|
|
--filter event=restart
|
|
--filter event=stop
|
|
--filter event=health_status
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
deploy:
|
|
restart_policy:
|
|
condition: on-failure |