This guide provides instructions for integrating Loki for application logs in your project.
Run the following command to install the Loki Docker driver:
docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions
In your docker-compose.yml
file, add the following logging configuration to each service:
logging:
driver: loki
options:
loki-url: "http://loki:3100/loki/api/v1/push"
With these configurations, your application logs will be sent to Loki, which can be then visualised in Grafana.