diff --git a/roles/haproxy/files/haproxy.cfg b/roles/haproxy/files/haproxy.cfg index e240583..c4e6eed 100644 --- a/roles/haproxy/files/haproxy.cfg +++ b/roles/haproxy/files/haproxy.cfg @@ -98,6 +98,9 @@ frontend https acl host_git hdr(host) -i git.comfycamp.space use_backend forgejo if host_git + acl host_uptime hdr(host) -i uptime.comfycamp.space + use_backend uptime_kuma if host_uptime + acl host_jellyfin hdr(host) -i jf.comfycamp.space use_backend jellyfin if host_jellyfin @@ -218,3 +221,6 @@ backend freshrss backend phoenix server s1 phoenix-1:8080 check + +backend uptime_kuma + server s1 uptime-kuma-1:3001 check diff --git a/roles/monitoring/tasks/main.yml b/roles/monitoring/tasks/main.yml index 1f0b753..4badc38 100644 --- a/roles/monitoring/tasks/main.yml +++ b/roles/monitoring/tasks/main.yml @@ -2,3 +2,4 @@ - import_tasks: grafana.yml - import_tasks: prometheus.yml - import_tasks: postgresql.yml +- import_tasks: uptime_kuma.yml diff --git a/roles/monitoring/tasks/uptime_kuma.yml b/roles/monitoring/tasks/uptime_kuma.yml new file mode 100644 index 0000000..2002f60 --- /dev/null +++ b/roles/monitoring/tasks/uptime_kuma.yml @@ -0,0 +1,14 @@ +- name: Create uptime kuma volume + become: true + community.docker.docker_volume: + name: uptime-kuma +- name: Start uptime kuma container + become: true + community.docker.docker_container: + name: uptime-kuma-1 + image: louislam/uptime-kuma:1.23.15 + volumes: + - uptime-kuma:/app/data + networks: + - name: haproxy + restart_policy: unless-stopped