1
0
Fork 0

add grafana, loki, promtail

This commit is contained in:
Lukáš Kucharczyk 2023-01-26 12:05:08 +01:00
parent 08b630fea2
commit 2717fa286d
2 changed files with 52 additions and 1 deletions

4
.env
View File

@ -48,3 +48,7 @@ DOKKU_EXTERNAL_PORT_2=8081
DOKKU_INTERNAL_PORT_2=80 DOKKU_INTERNAL_PORT_2=80
DOKKU_EXTERNAL_PORT_3=8443 DOKKU_EXTERNAL_PORT_3=8443
DOKKU_INTERNAL_PORT_3=443 DOKKU_INTERNAL_PORT_3=443
LOKI_EXTERNAL_PORT=3100
LOKI_INTERNAL_PORT=3100
GRAFANA_EXTERNAL_PORT=3500
GRAFANA_INTERNAL_PORT=3000

View File

@ -384,7 +384,54 @@ services:
# served by caddy # served by caddy
# - snibox # - snibox
loki:
image: grafana/loki:2.6.1
container_name: loki
user: "${PUID}"
ports:
- "${LOKI_EXTERNAL_PORT}:${LOKI_INTERNAL_PORT}"
command: -config.file=/etc/loki/local-config.yaml
volumes:
- "${DOCKER_STORAGE_PATH}/loki/local-config.yaml:/etc/loki/local-config.yaml"
networks:
- loki
profiles:
- base
- infra
restart: unless-stopped
promtail:
image: grafana/promtail:2.6.1
container_name: promtail
user: "${PUID}"
volumes:
- /var/log:/var/log
- "${DOCKER_STORAGE_PATH}/promtail/config.yml:/etc/promtail/config.yml"
command: -config.file=/etc/promtail/config.yml
depends_on:
- loki
networks:
- loki
profiles:
- base
- infra
restart: unless-stopped
grafana:
image: grafana/grafana:latest
container_name: grafana
user: "${PUID}"
ports:
- "${GRAFANA_EXTERNAL_PORT}:${GRAFANA_INTERNAL_PORT}"
networks:
- loki
profiles:
- base
- infra
restart: unless-stopped
networks: networks:
loki:
caddy: caddy:
attachable: true attachable: true
internal: true internal: true