Set Dashy as default Ansible-NAS dashboard. Fix Dashy config persistence (fixes #540)

This commit is contained in:
David Stephens 2024-01-02 00:32:34 +00:00
parent df1d9329a5
commit 09ddc6ab8f
4 changed files with 65 additions and 2 deletions

View file

@ -14,5 +14,5 @@ ansible_nas_hostname: ansible-nas
ansible_nas_timezone: Etc/UTC
## Enable some applications
heimdall_enabled: true
dashy_enabled: true
portainer_enabled: true

View file

@ -2,12 +2,15 @@
dashy_enabled: false
dashy_available_externally: false
# directories
dashy_data_directory: "{{ docker_home }}/dashy"
# network
dashy_port: "8082"
dashy_hostname: "dashy"
# specs
dashy_memory: 2g
dashy_memory: 1g
# docker
dashy_container_name: dashy

View file

@ -0,0 +1,46 @@
---
# Page meta info, like heading, footer text and nav links
pageInfo:
title: Dashy
description: Welcome to your new Ansible-NAS dashboard!
navLinks:
- title: Ansible-NAS
path: https://ansible-nas.io
- title: Documentation
path: https://dashy.to/docs
# Optional app settings and configuration
appConfig:
theme: colorful
# Main content - An array of sections, each containing an array of items
sections:
- name: Getting Started
icon: fas fa-rocket
items:
- title: Dashy Live
description: Development a project management links for Dashy
icon: https://i.ibb.co/qWWpD0v/astro-dab-128.png
url: https://live.dashy.to/
target: newtab
- title: GitHub
description: Source Code, Issues and Pull Requests
url: https://github.com/lissy93/dashy
icon: favicon
- title: Docs
description: Configuring & Usage Documentation
provider: Dashy.to
icon: far fa-book
url: https://dashy.to/docs
- title: Showcase
description: See how others are using Dashy
url: https://github.com/Lissy93/dashy/blob/master/docs/showcase.md
icon: far fa-grin-hearts
- title: Config Guide
description: See full list of configuration options
url: https://github.com/Lissy93/dashy/blob/master/docs/configuring.md
icon: fas fa-wrench
- title: Support
description: Get help with Dashy, raise a bug, or get in contact
url: https://github.com/Lissy93/dashy/blob/master/.github/SUPPORT.md
icon: far fa-hands-helping

View file

@ -1,6 +1,18 @@
---
- name: Start Dashy
block:
- name: Create Dashy Directory
ansible.builtin.file:
path: "{{ item }}"
state: directory
with_items:
- "{{ dashy_data_directory }}"
- name: Copy base config
ansible.builtin.copy:
src: conf.yml
dest: "{{ dashy_data_directory }}/conf.yml"
- name: Dashy Docker Container
community.docker.docker_container:
name: "{{ dashy_container_name }}"
@ -10,6 +22,8 @@
- "{{ dashy_port }}:80"
restart_policy: unless-stopped
memory: "{{ dashy_memory }}"
volumes:
- "{{ dashy_data_directory }}/conf.yml:/app/public/conf.yml:rw"
labels:
traefik.enable: "{{ dashy_available_externally | string }}"
traefik.http.routers.dashy.rule: "Host(`{{ dashy_hostname }}.{{ ansible_nas_domain }}`)"