Merge pull request 'feat: 🎉 add uptime-kuma container to pottwal' (!88) from dkdent/netz39-infra-ansible:add-uptime-kuma into master

Reviewed-on: https://gitea.n39.eu/Netz39_Admin/netz39-infra-ansible/pulls/88
Reviewed-by: Alexander Dahl <alex@netz39.de>
Reviewed-by: tux <tux@netz39.de>
This commit is contained in:
Stefan Haun 2022-10-24 18:32:57 +00:00
commit 37f1906ca1
2 changed files with 30 additions and 0 deletions

View file

@ -28,6 +28,7 @@
- name: conference.jabber.n39.eu - name: conference.jabber.n39.eu
- name: influx.n39.eu - name: influx.n39.eu
local: true local: true
- name: uptime.n39.eu
- server: radon - server: radon
hosts: hosts:
- name: nodered.n39.eu - name: nodered.n39.eu

View file

@ -27,6 +27,8 @@
influxdb_host_port: 8088 influxdb_host_port: 8088
influxdb_image: influxdb:2.4-alpine influxdb_image: influxdb:2.4-alpine
uptimekuma_host_port: 8085
roles: roles:
- role: docker_setup - role: docker_setup
vars: vars:
@ -48,6 +50,7 @@
deploy_cert_hook: "docker exec prosody prosodyctl --root cert import ${DOMAIN} /var/lib/dehydrated/certs" deploy_cert_hook: "docker exec prosody prosodyctl --root cert import ${DOMAIN} /var/lib/dehydrated/certs"
- name: redmine.n39.eu - name: redmine.n39.eu
- name: influx.n39.eu - name: influx.n39.eu
- name: uptime.n39.eu
- role: penguineer.dehydrated_cron - role: penguineer.dehydrated_cron
- role: dd24-dyndns-cron - role: dd24-dyndns-cron
# variables are set in the inventory # variables are set in the inventory
@ -356,5 +359,31 @@
site_name: redmine.n39.eu site_name: redmine.n39.eu
proxy_port: "{{ redmine_host_port }}" proxy_port: "{{ redmine_host_port }}"
- name: Ensure the uptime-kuma directories exist
file:
path: "{{ item }}"
state: directory
with_items:
- "{{ data_dir }}/uptimekuma"
- name: Ensure container for uptime-kuma is running
docker_container:
name: uptime-kuma
image: "louislam/uptime-kuma:1"
pull: true
state: started
detach: yes
ports:
- "127.0.0.1:{{ uptimekuma_host_port }}:3001"
restart_policy: unless-stopped
volumes:
- "{{ data_dir }}/uptime-kuma:/app/data"
- name: Setup proxy site uptime.n39.eu
include_role:
name: setup-http-site-proxy
vars:
site_name: uptime.n39.eu
proxy_port: "{{ uptimekuma_host_port }}"
handlers: handlers: