+ Setting up Grafana service (metrics.lablad)

+ Reverse proxy entry for nginx routing

This is the first step for establishing a goal for the server's logging stack
This commit is contained in:
shockrah 2022-04-14 20:43:10 -07:00
parent 0f392dec09
commit 30ee715264
5 changed files with 40 additions and 5 deletions

View File

@ -1,10 +1,6 @@
# this file pertains to the gitea service which is served under the fqdn:
# git.lablad
# the default port is listed under /vars/main.yml as 3000 as gitea_pub_port
server {
server_name files.lablad;
location / {
proxy_pass http://127.0.0.1:8080;
}
}
}

View File

@ -0,0 +1,10 @@
# metrics.lablad
server {
server_name metrics.lablad;
proxy_set_header Host $http_host;
location / {
proxy_pass http://127.0.0.1:6000;
}
}

View File

@ -0,0 +1,26 @@
---
- hosts: leftcoastlab
become: yes
tasks:
- name: Include Vars
include_vars:
dir: ../vars
- name: Create Grafana Volume
community.docker.docker_volume:
name: grafana-volume
- name: Setup Grafana Container(latest)
community.docker.docker_container:
name: grafana
image: grafana/grafana-oss:latest
pull: yes
restart_policy: always
recreate: yes
timeout: 120
ports:
- "{{GRAFANA_PORT}}:3000"
volumes:
- "grafana-volume:/var/lib/grafana/"

View File

@ -43,6 +43,7 @@
- ../files/git.lablad
- ../files/music.lablad
- ../files/files.lablad
- ../files/metrics.lablad
- name: Enable Sites
file:
@ -53,6 +54,7 @@
- git.lablad
- music.lablad
- files.lablad
- metrics.lablad
notify:
- restart-nginx

View File

@ -4,3 +4,4 @@ DEBIAN_CODENAME: sid
GITEA_PUB_PORT: 3000
GITEA_SSH_PORT: 2222
FILEBROWSER_PORT: 8080
GRAFANA_PORT: 6000