1
0
Fork 0

Begin add loki in container

This commit is contained in:
Florian RICHER 2023-09-25 12:23:11 +02:00
parent 488c240089
commit 64c5be9359
3 changed files with 23 additions and 0 deletions

View file

@ -12,4 +12,16 @@ ansible-playbook playbook.yml --ask-become-pass
```bash
cd $(docker volume inspect [NAME] | jq -r '.[0].Mountpoint')
```
# LOGGING
```yml
logging:
driver: loki
options:
loki-url: "https://[username]:[password]@[url]/loki/api/v1/push"
logging:
driver: none
```

View file

@ -19,6 +19,13 @@
enabled: true
state: started
- name: Install loki-docker-driver plugin
community.docker.docker_plugin:
plugin_name: loki-docker-driver
alias: loki
state: present
become: true
- name: Create proxy network
community.docker.docker_network:
name: proxy

View file

@ -47,6 +47,10 @@ services:
- traefik.http.routers.traefik-secure.tls=true
- traefik.http.routers.traefik-secure.tls.certresolver=sslResolver
- traefik.http.routers.traefik-secure.service=api@internal
logging:
driver: loki
options:
loki-url: "http://loki:3100/loki/api/v1/push"
networks:
metrics: