Skip to content

Commit a38447b

Browse files
committed
+ add service dashboard role: homepage
1 parent 6201291 commit a38447b

File tree

16 files changed

+254
-0
lines changed

16 files changed

+254
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ The following services are available:
5151
* low-latency voice chat: [mumble](https://www.mumble.com/)
5252
* home automation: [homeassistant](https://www.home-assistant.io/)
5353
with [mosquitto MQTT](https://mosquitto.org/)
54+
* service dashboard: [homepage](https://gethomepage.dev/)
5455

5556

5657

Vagrantfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Vagrant.configure("2") do |config|
2222
main.vm.network "private_network", ip: "192.168.10.6"
2323
#main.vm.network "forwarded_port", guest: 53, host: 53 # adguard
2424
main.vm.network "forwarded_port", guest: 3000, host: 3000 # adguard
25+
main.vm.network "forwarded_port", guest: 4000, host: 4000 # homepage
2526
main.vm.network "forwarded_port", guest: 80, host: 80 # caddy
2627
main.vm.network "forwarded_port", guest: 443, host: 443 # caddy
2728
main.vm.network "forwarded_port", guest: 8123, host: 8123 # homeassistant

ansible/playbook_main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,3 +173,8 @@
173173
- role: jellyfin
174174
- role: jellyseerr
175175
- role: lyrion
176+
177+
- role: homepage
178+
vars:
179+
homepage_adguard_user: "{{ main_user }}"
180+
homepage_adguard_password: "{{ main_password }}"

ansible/roles/caddy/templates/Caddyfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ gallery.{{ domain }} gallery.{{ domain2 }} {
2323
file_server
2424
}
2525

26+
dashboard.{{ domain }} dashboard.{{ domain2 }} {
27+
reverse_proxy homepage:3000
28+
}
29+
2630
home.{{ domain }} home.{{ domain2 }} {
2731
reverse_proxy homeassistant:8123 {
2832
header_up X-Real-IP {remote_host}

ansible/roles/caddy/templates/docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ services:
1818
- /share/web/wiki:/srv/wiki
1919
networks:
2020
- bitwarden_net
21+
- homepage_net
2122
- homeassistant_net
2223
- jellyfin_net
2324

2425
networks:
2526
bitwarden_net:
27+
homepage_net:
2628
homeassistant_net:
2729
jellyfin_net:
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
3+
homepage_service_name: "homepage"
4+
homepage_app_folder: "/etc/{{ homepage_service_name }}"
5+
homepage_config_folder: "{{ homepage_app_folder }}/config"
6+
7+
homepage_adguard_user: ""
8+
homepage_adguard_password: ""

ansible/roles/homepage/tasks/main.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
3+
- name: "Create app folder: {{ homepage_app_folder }}"
4+
become: true
5+
ansible.builtin.file:
6+
path: "{{ homepage_app_folder }}"
7+
state: directory
8+
mode: "644"
9+
10+
- name: "Create config folder: {{ homepage_config_folder }}"
11+
become: true
12+
ansible.builtin.file:
13+
path: "{{ homepage_config_folder }}"
14+
state: directory
15+
mode: "644"
16+
17+
- name: "Copy config files to {{ homepage_config_folder }}"
18+
become: true
19+
ansible.builtin.template:
20+
src: "templates/{{ item }}"
21+
dest: "{{ homepage_config_folder }}/"
22+
mode: "u+rw"
23+
with_items:
24+
- "bookmarks.yaml"
25+
- "docker.yaml"
26+
- "services.yaml"
27+
- "settings.yaml"
28+
- "widgets.yaml"
29+
register: config
30+
31+
- name: "Prepare environment file. Only if no file exist."
32+
become: true
33+
ansible.builtin.template:
34+
src: "homepage.env"
35+
dest: "{{ homepage_config_folder }}/"
36+
mode: "u+rw"
37+
force: false
38+
39+
- ansible.builtin.include_role:
40+
name: docker-compose-service
41+
vars:
42+
service_name: "{{ homepage_service_name }}"
43+
force_restart: "{{ config.changed }}"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
- Development:
3+
- My Github Profile:
4+
- icon: github-light.svg
5+
href: https://github.com/langchr86
6+
description: github.com/langchr86
7+
- This setup is managed by Ansible:
8+
- icon: github-light.svg
9+
href: https://github.com/langchr86/server-config
10+
description: github.com/langchr86/server-config
11+
12+
- Wiki:
13+
- Lang Wiki:
14+
- icon: si-markdown-#eeeeee
15+
href: https://wiki.langchr86.ch
16+
17+
- Local Access:
18+
- Vaultwarden Admin:
19+
- icon: bitwarden.svg
20+
href: http://{{ ip_address_main }}:8088/admin
21+
description: {{ ip_address_main }}:8088/admin
22+
- Home Assistant:
23+
- icon: home-assistant.svg
24+
href: http://{{ ip_address_main }}:8123
25+
description: {{ ip_address_main }}:8123
26+
- Jellyfin:
27+
- icon: jellyfin.svg
28+
href: http://{{ ip_address_main }}:8096
29+
description: {{ ip_address_main }}:8096
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
version: "3.5"
3+
services:
4+
homepage:
5+
container_name: "homepage"
6+
image: ghcr.io/gethomepage/homepage:v0.10.9
7+
ports:
8+
- "4000:3000"
9+
env_file: "{{ homepage_config_folder }}/homepage.env"
10+
volumes:
11+
- {{ homepage_config_folder }}:/app/config:ro
12+
- /share:/share:ro
13+
- /var/run/docker.sock:/var/run/docker.sock:ro
14+
networks:
15+
- caddy_homepage_net
16+
- caddy_jellyfin_net
17+
18+
networks:
19+
caddy_homepage_net:
20+
external: true
21+
caddy_jellyfin_net:
22+
external: true
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
local-docker:
3+
socket: /var/run/docker.sock
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
HOMEPAGE_VAR_JELLYFIN_API_KEY=""
2+
3+
HOMEPAGE_VAR_ADGUARD_USER="{{ homepage_adguard_user }}"
4+
HOMEPAGE_VAR_ADGUARD_PASSWORD="{{ homepage_adguard_password }}"
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
- Media:
3+
- Jellyfin:
4+
icon: jellyfin.svg
5+
href: https://media.{{ domain }}
6+
server: local-docker
7+
container: jellyfin
8+
widget:
9+
type: jellyfin
10+
url: http://{{ ip_address_main }}:8096
11+
key: {{ '{{' }}HOMEPAGE_VAR_JELLYFIN_API_KEY{{ '}}' }}
12+
enableBlocks: true
13+
enableNowPlaying: false
14+
- Jellyseerr:
15+
icon: jellyseerr.svg
16+
href: https://mediarequest.{{ domain }}
17+
server: local-docker
18+
container: jellyseerr
19+
- Lyrion:
20+
icon: lyrion.svg
21+
href: http://{{ ip_address_main }}:9000/
22+
server: local-docker
23+
container: lyrion
24+
25+
- Network:
26+
- AdGuard:
27+
icon: adguard-home.svg
28+
href: http://{{ ip_address_main }}:3000/
29+
server: local-docker
30+
container: adguard
31+
widget:
32+
type: adguard
33+
url: http://{{ ip_address_main }}:3000/
34+
username: {{ '{{' }}HOMEPAGE_VAR_ADGUARD_USER{{ '}}' }}
35+
password: {{ '{{' }}HOMEPAGE_VAR_ADGUARD_PASSWORD{{ '}}' }}
36+
- Caddy:
37+
icon: caddy.svg
38+
server: local-docker
39+
container: caddy
40+
- DDClient:
41+
icon: ddclient.svg
42+
server: local-docker
43+
container: ddclient
44+
45+
- Home:
46+
- Home Assistant:
47+
icon: home-assistant.svg
48+
href: https://home.{{ domain }}
49+
server: local-docker
50+
container: homeassistant
51+
- MQTT-Broker:
52+
icon: mqtt.svg
53+
server: local-docker
54+
container: mosquitto
55+
56+
- Downloads:
57+
- JDownloader:
58+
icon: jdownloader2.png
59+
href: https://my.jdownloader.org
60+
server: local-docker
61+
container: jdownloader
62+
- Transmission:
63+
icon: si-transmission-#eeeeee
64+
href: http://{{ ip_address_main }}:9091/
65+
server: local-docker
66+
container: transmission
67+
68+
- Admin:
69+
- Bitwarden:
70+
icon: bitwarden.svg
71+
href: https://bitwarden.{{ domain }}
72+
server: local-docker
73+
container: bitwarden
74+
- Mumble:
75+
icon: mumble.svg
76+
server: local-docker
77+
container: mumble
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: "{{ hostname_main }}"
3+
theme: dark
4+
color: neutral
5+
6+
base: "https://dashboard.{{ domain }}"
7+
8+
headerStyle: boxedWidgets
9+
10+
layout:
11+
Media:
12+
useEqualHeights: true
13+
style: row
14+
columns: 3
15+
Network:
16+
useEqualHeights: true
17+
style: row
18+
columns: 3
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
- greeting:
3+
text_size: 4xl
4+
text: "{{ hostname_main }}"
5+
6+
- resources:
7+
expanded: true
8+
cpu: true
9+
memory: true
10+
11+
- resources:
12+
label: System Disk
13+
expanded: true
14+
disk: "/"
15+
16+
- resources:
17+
label: Storage Disks
18+
expanded: true
19+
disk: "/share"

docs/homepage.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Homepage Dashboard
2+
========
3+
4+
Access tokens
5+
-------------
6+
7+
Some services need to have an access token that can be used to receive status information to show on the dashboard.
8+
The following services need to generate an access token which then needs to be included in the `homepage.env`.
9+
10+
* Jellyfin
11+
12+
The environment file is created initially and is not overwritten by later ansible executions.
13+
After the file was completed we need to restart the container:
14+
15+
~~~~~~
16+
systemctl restart homepage
17+
~~~~~~

docs/subdomain-check/subdomains.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
https://bitwarden.langchr86.ch
2+
https://dashboard.langchr86.ch
23
https://fileshare.langchr86.ch/link.txt
34
https://gallery.langchr86.ch/gallery.html
45
https://home.langchr86.ch

0 commit comments

Comments
 (0)