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