Begin add loki in container
This commit is contained in:
parent
488c240089
commit
64c5be9359
3 changed files with 23 additions and 0 deletions
12
README.md
12
README.md
|
@ -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
|
||||
```
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue