feat: add prometheus and grafana docker

rename WG_HOSTNAME_VPN -> HOSTNAME_VPN
This commit is contained in:
2025-08-03 19:04:04 +00:00
parent d286202cc5
commit 2d5ec34d5a
2 changed files with 28 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
volumes: volumes:
etc_wireguard: etc_wireguard:
grafana-storage:
etc_certs: etc_certs:
# save certifcate # save certifcate
etc_acme: etc_acme:
@@ -45,8 +46,8 @@ services:
- net.ipv6.conf.all.forwarding=1 - net.ipv6.conf.all.forwarding=1
- net.ipv6.conf.default.forwarding=1 - net.ipv6.conf.default.forwarding=1
environment: environment:
- VIRTUAL_HOST=${WG_HOSTNAME_VPN} - VIRTUAL_HOST=${HOSTNAME_VPN}
- LETSENCRYPT_HOST=${WG_HOSTNAME_VPN} - LETSENCRYPT_HOST=${HOSTNAME_VPN}
- LETSENCRYPT_EMAIL=${EMAIL} - LETSENCRYPT_EMAIL=${EMAIL}
- VIRTUAL_PORT=51821 - VIRTUAL_PORT=51821
depends_on: depends_on:
@@ -89,6 +90,29 @@ services:
networks: networks:
- network-container - network-container
prometheus:
image: prom/prometheus:latest
container_name: prometheus
volumes:
- /etc/serverconfig/prometheus.yml:/etc/prometheus/prometheus.yml
restart: unless-stopped
networks:
- network-container
grafana:
image: grafana/grafana
container_name: grafana
restart: unless-stopped
environment:
- VIRTUAL_HOST=${HOSTNAME_GRAFANA}
- LETSENCRYPT_HOST=${HOSTNAME_GRAFANA}
- VIRTUAL_PORT=3000
- LETSENCRYPT_EMAIL=${EMAIL}
volumes:
- grafana-storage:/var/lib/grafana
networks:
- network-container
# synapse: # synapse:
# image: matrixdotorg/synapse:latest # image: matrixdotorg/synapse:latest
# container_name: synapse # container_name: synapse

View File

@@ -9,7 +9,7 @@ if [[ "--install" == $INSTALLED ]]; then
docker-compose Installation\n\ docker-compose Installation\n\
--------------------------------------------------" --------------------------------------------------"
ENV_LIST=("EMAIL" "WG_HOSTNAME_VPN") ENV_LIST=("EMAIL" "HOSTNAME_VPN" "HOSTNAME_GRAFANA")
for env in "${ENV_LIST[@]}"; do for env in "${ENV_LIST[@]}"; do
read -p "Enter value for $env: " value read -p "Enter value for $env: " value