#download config from grafana official
wget https://raw.githubusercontent.com/grafana/loki/v2.9.1/cmd/loki/loki-local-config.yaml -O loki-config.yaml
#run docker and make it persisten
docker run --name loki -d -v $(pwd):/mnt/config -v loki-date:/tmp -p 3100:3100 grafana/loki:2.9.1 -config.file=/mnt/config/loki-config.yaml
#download promtail config
wget https://raw.githubusercontent.com/grafana/loki/v2.9.1/clients/cmd/promtail/promtail-docker-config.yaml -O promtail-config.yaml
docker run --name promtail -d -v $(pwd):/mnt/config -v /var/log:/var/log --link loki grafana/promtail:2.9.1 -config.file=/mnt/config/promtail-config.yaml