From b978a22eba044123b14140a08d0d70978d4e1fc9 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Sun, 19 Feb 2023 12:19:13 +0100 Subject: [PATCH 1/2] add config for homebox container add TZ env to homebox container --- host-pottwal.yml | 39 +++++++++++++++++++++++++++++++ host_vars/pottwal.n39.eu/vars.yml | 3 +++ 2 files changed, 42 insertions(+) diff --git a/host-pottwal.yml b/host-pottwal.yml index 769a367..e8b7240 100644 --- a/host-pottwal.yml +++ b/host-pottwal.yml @@ -23,6 +23,7 @@ - name: "{{ influxdb_domain_name }}" - name: uptime.n39.eu - name: "{{ grafana_domain_name }}" + - name: "{{ homebox_domain_name }}" - role: penguineer.dehydrated_cron - role: dd24_dyndns_cron # variables are set in the inventory @@ -474,6 +475,44 @@ proxy_port: "{{ grafana_host_port }}" proxy_preserve_host: "On" + - name: Ensure the homebox directories exist + file: + path: "{{ item.path }}" + owner: "{{ item.owner | default('root') }}" + mode: "{{ item.mode }}" + state: directory + with_items: + - path: "{{ data_dir }}/homebox" + mode: "0755" + - path: "{{ data_dir }}/homebox/data" + mode: "0755" + + - name: Ensure container for homebox is running + docker_container: + name: homebox + image: "ghcr.io/hay-kot/homebox" + pull: true + state: started + detach: yes + restart_policy: unless-stopped + ports: + - "127.0.0.1:{{ homebox_host_port }}:7745" + volumes: + - "{{ data_dir }}/homebox/data:/data" + env: + TZ: "{{ timezone }}" + HBOX_LOG_LEVEL: "info" + HBOX_LOG_FORMAT: "text" + HBOX_WEB_MAX_UPLOAD_SIZE: "10" + + - name: Setup proxy site {{ homebox_domain_name }} + include_role: + name: setup_http_site_proxy + vars: + site_name: "{{ homebox_domain_name }}" + proxy_port: "{{ homebox_host_port }}" + proxy_preserve_host: "On" + handlers: - name: Restart prosody community.docker.docker_container: diff --git a/host_vars/pottwal.n39.eu/vars.yml b/host_vars/pottwal.n39.eu/vars.yml index 7e12fe0..166a151 100644 --- a/host_vars/pottwal.n39.eu/vars.yml +++ b/host_vars/pottwal.n39.eu/vars.yml @@ -41,3 +41,6 @@ uptimekuma_host_port: 8085 grafana_host_port: 8089 grafana_domain_name: grafana.n39.eu grafana_admin_password: "{{ vault_grafana_admin_password }}" + +homebox_host_port: 8090 +homebox_domain_name: inventory.n39.eu From 8c637f0a1f2a5633eadfe80b1b39102f03a0c044 Mon Sep 17 00:00:00 2001 From: dkdent Date: Fri, 24 Feb 2023 18:01:14 +0100 Subject: [PATCH 2/2] add entry on holmium to enable https ac cess to inventory.n39.eu --- host-holmium.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/host-holmium.yml b/host-holmium.yml index 13aff54..a6620c7 100644 --- a/host-holmium.yml +++ b/host-holmium.yml @@ -30,6 +30,7 @@ local: true - name: uptime.n39.eu - name: grafana.n39.eu + - name: inventory.n39.eu - server: radon hosts: - name: nodered.n39.eu