👌 IMPROVE: Refactor Grafana environment variables for consistency and add resource limits for Loki service
This commit is contained in:
@@ -14,24 +14,26 @@ services:
|
|||||||
image: docker.io/grafana/grafana-oss:12.0.0
|
image: docker.io/grafana/grafana-oss:12.0.0
|
||||||
container_name: grafana
|
container_name: grafana
|
||||||
environment:
|
environment:
|
||||||
- GF_SECURITY_ADMIN_PASSWORD=admin
|
GF_PATHS_PROVISIONING: /var/lib/grafana/provisioning/
|
||||||
|
GF_SECURITY_ADMIN_PASSWORD: admin
|
||||||
# - GF_SERVER_DOMAIN=%(protocol)s://%(domain)s:%(http_port)s/
|
# - GF_SERVER_DOMAIN=%(protocol)s://%(domain)s:%(http_port)s/
|
||||||
# - GF_SERVER_ROOT_URL=%(protocol)s://%(domain)s/
|
# - GF_SERVER_ROOT_URL=%(protocol)s://%(domain)s/
|
||||||
- GF_SERVER_DOMAIN=grafana.phx-erp.de
|
GF_SERVER_DOMAIN: grafana.phx-erp.de
|
||||||
- GF_SERVER_PROTOCOL=https
|
GF_SERVER_PROTOCOL: https
|
||||||
# - GF_SERVER_HTTP_PORT=3000
|
# - GF_SERVER_HTTP_PORT=3000
|
||||||
- GF_LOG_LEVEL=debug
|
GF_LOG_LEVEL: debug
|
||||||
- GF_SMTP_ENABLED=true
|
GF_SMTP_ENABLED: true
|
||||||
- GF_SMTP_FROM_ADDRESS=admin@phx-erp.de
|
GF_SMTP_FROM_ADDRESS: admin@phx-erp.de
|
||||||
- GF_SMTP_FROM_NAME=Grafana
|
GF_SMTP_FROM_NAME: Grafana
|
||||||
- GF_SMTP_HOST=mail.phx-erp.de:465
|
GF_SMTP_HOST: mail.phx-erp.de:465
|
||||||
- GF_SMTP_PASSWORD=0rB0@et68
|
GF_SMTP_PASSWORD: 0rB0@et68
|
||||||
- GF_SMTP_USER=yuri.lima@phx-erp.de
|
GF_SMTP_USER: yuri.lima@phx-erp.de
|
||||||
- GF_SMTP_STARTTLS_POLICY=false
|
GF_SMTP_STARTTLS_POLICY: false
|
||||||
- GF_SMTP_SKIP_VERIFY=true
|
GF_SMTP_SKIP_VERIFY: true
|
||||||
- GF_SMTP_ENABLE_TRACING=false
|
GF_SMTP_ENABLE_TRACING: false
|
||||||
volumes:
|
volumes:
|
||||||
- grafana-data:/var/lib/grafana
|
- grafana-data:/var/lib/grafana
|
||||||
|
- ./config/provisioning:/var/lib/grafana/provisioning/
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- grafana-prometheus
|
- grafana-prometheus
|
||||||
@@ -41,8 +43,8 @@ services:
|
|||||||
image: docker.io/prom/prometheus:v3.1.0
|
image: docker.io/prom/prometheus:v3.1.0
|
||||||
container_name: prometheus
|
container_name: prometheus
|
||||||
user: "65534:65534"
|
user: "65534:65534"
|
||||||
ports:
|
# ports:
|
||||||
- "9090:9090"
|
# - "9090:9090"
|
||||||
command:
|
command:
|
||||||
- "--config.file=/etc/prometheus/prometheus.yaml"
|
- "--config.file=/etc/prometheus/prometheus.yaml"
|
||||||
- "--web.config.file=/etc/prometheus/web-config.yaml"
|
- "--web.config.file=/etc/prometheus/web-config.yaml"
|
||||||
@@ -64,10 +66,6 @@ services:
|
|||||||
container_name: loki
|
container_name: loki
|
||||||
image: docker.io/grafana/loki:3.5.0
|
image: docker.io/grafana/loki:3.5.0
|
||||||
command: "-config.file=/etc/loki/config.yaml" # Tells Grafana Loki to start with the config file.
|
command: "-config.file=/etc/loki/config.yaml" # Tells Grafana Loki to start with the config file.
|
||||||
ports:
|
|
||||||
# --> (Optional) Remove when using traefik...
|
|
||||||
- "3100:3100"
|
|
||||||
# <--
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./config/loki-config.yaml:/etc/loki/config.yaml:ro
|
- ./config/loki-config.yaml:/etc/loki/config.yaml:ro
|
||||||
- data_loki:/loki:rw
|
- data_loki:/loki:rw
|
||||||
@@ -84,7 +82,6 @@ services:
|
|||||||
container_name: https_portal
|
container_name: https_portal
|
||||||
image: "steveltn/https-portal:1.21"
|
image: "steveltn/https-portal:1.21"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
user: "root"
|
|
||||||
networks:
|
networks:
|
||||||
- grafana-prometheus
|
- grafana-prometheus
|
||||||
ports:
|
ports:
|
||||||
@@ -104,4 +101,9 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- prometheus
|
- prometheus
|
||||||
- grafana
|
- grafana
|
||||||
- loki
|
- loki
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.50'
|
||||||
|
memory: 512M
|
||||||
Reference in New Issue
Block a user