Skip to content

Commit a7842c9

Browse files
committed
Software title: Homepage
1 parent 0a257fd commit a7842c9

File tree

6 files changed

+118
-0
lines changed

6 files changed

+118
-0
lines changed

tools/include/images/MAN009.png

30.9 KB
Loading
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
=== "Access to the web interface"
2+
3+
The web interface is accessible via port **3000**:
4+
5+
- URL: `https://<your.IP>:3000`
6+
- Username/Password: none
7+
8+
Configuration: Please reffer to official manual <https://gethomepage.dev/configs/>
9+
10+
=== "Directories"
11+
12+
- Install directory: `/armbian/homepage`
13+
- Site configuration directory: `/armbian/homepage/config`
14+
15+
=== "View logs"
16+
17+
```sh
18+
docker logs -f homepage
19+
```
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
A modern, fully static, fast, secure fully proxied, highly customizable application dashboard with integrations for over 100 services and translations into multiple languages. Easily configured via YAML files or through docker label discovery.

tools/json/config.software.json

+20
Original file line numberDiff line numberDiff line change
@@ -1187,6 +1187,26 @@
11871187
"status": "Stable",
11881188
"author": "@Tearran",
11891189
"condition": ""
1190+
},
1191+
{
1192+
"id": "MAN009",
1193+
"description": "Install Homepage",
1194+
"command": [
1195+
"module_homepage install"
1196+
],
1197+
"status": "Stable",
1198+
"author": "@igorpecovnik",
1199+
"condition": "! module_homepage status"
1200+
},
1201+
{
1202+
"id": "MAN010",
1203+
"description": "Remove Homepage",
1204+
"command": [
1205+
"module_homepage remove"
1206+
],
1207+
"status": "Stable",
1208+
"author": "@igorpecovnik",
1209+
"condition": "module_homepage status"
11901210
}
11911211
]
11921212
}

tools/modules/runtime/config.runtime.sh

+1
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ update_sub_submenu_data "Software" "Media" "MED026" "http://$LOCALIPADD:${module
105105
update_sub_submenu_data "Software" "Containers" "CON006" "http://$LOCALIPADD:${module_options["module_portainer,port"]}"
106106
update_sub_submenu_data "Software" "HomeAutomation" "HA004" "http://$LOCALIPADD:${module_options["module_haos,port"]}"
107107
update_sub_submenu_data "Software" "Monitoring" "MON004" "http://$LOCALIPADD:${module_options["module_netdata,port"]}"
108+
update_sub_submenu_data "Software" "Management" "MAN010" "http://$LOCALIPADD:${module_options["module_homepage,port"]}"
108109
update_sub_submenu_data "Software" "Downloaders" "DOW002" "http://$LOCALIPADD:${module_options["module_qbittorrent,port"]}"
109110
update_sub_submenu_data "Software" "Downloaders" "DOW004" "http://$LOCALIPADD:${module_options["module_deluge,port"]}"
110111
update_sub_submenu_data "Software" "Downloaders" "DOW006" "http://$LOCALIPADD:${module_options["module_transmission,port"]}"
+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
module_options+=(
2+
["module_homepage,author"]="@armbian"
3+
["module_homepage,feature"]="module_homepage"
4+
["module_homepage,desc"]="Install homepage container"
5+
["module_homepage,example"]="install remove status help"
6+
["module_homepage,port"]="3000"
7+
["module_homepage,status"]="Active"
8+
["module_homepage,arch"]=""
9+
)
10+
#
11+
# Module homepage
12+
#
13+
function module_homepage () {
14+
local title="homepage"
15+
local condition=$(which "$title" 2>/dev/null)
16+
17+
if check_if_installed docker-ce; then
18+
local container=$(docker container ls -a | mawk '/homepage?( |$)/{print $1}')
19+
local image=$(docker image ls -a | mawk '/homepage?( |$)/{print $3}')
20+
fi
21+
22+
local commands
23+
IFS=' ' read -r -a commands <<< "${module_options["module_homepage,example"]}"
24+
25+
HOMEPAGE_BASE="${SOFTWARE_FOLDER}/homepage"
26+
27+
case "$1" in
28+
"${commands[0]}")
29+
check_if_installed docker-ce || install_docker
30+
[[ -d "$HOMEPAGE_BASE" ]] || mkdir -p "$HOMEPAGE_BASE" || { echo "Couldn't create storage directory: $HOMEPAGE_BASE"; exit 1; }
31+
docker run -d \
32+
--name homepage \
33+
-e PUID=1000 \
34+
-e PGID=1000 \
35+
-p 3000:3000 \
36+
-v "${HOMEPAGE_BASE}/config:/app/config" \
37+
-v /var/run/docker.sock:/var/run/docker.sock:ro \
38+
--restart unless-stopped \
39+
ghcr.io/gethomepage/homepage:latest
40+
for i in $(seq 1 20); do
41+
if docker inspect -f '{{ index .Config.Labels "build_version" }}' homepage >/dev/null 2>&1 ; then
42+
break
43+
else
44+
sleep 3
45+
fi
46+
if [ $i -eq 20 ] ; then
47+
echo -e "\nTimed out waiting for ${title} to start, consult your container logs for more info (\`docker logs homepage\`)"
48+
exit 1
49+
fi
50+
done
51+
;;
52+
"${commands[1]}")
53+
[[ "${container}" ]] && docker container rm -f "$container" >/dev/null
54+
[[ "${image}" ]] && docker image rm "$image" >/dev/null
55+
[[ -n "${HOMEPAGE_BASE}" && "${HOMEPAGE_BASE}" != "/" ]] && rm -rf "${HOMEPAGE_BASE}"
56+
;;
57+
"${commands[2]}")
58+
if [[ "${container}" && "${image}" ]]; then
59+
return 0
60+
else
61+
return 1
62+
fi
63+
;;
64+
"${commands[3]}")
65+
echo -e "\nUsage: ${module_options["module_homepage,feature"]} <command>"
66+
echo -e "Commands: ${module_options["module_homepage,example"]}"
67+
echo "Available commands:"
68+
echo -e "\tinstall\t- Install $title."
69+
echo -e "\tstatus\t- Installation status $title."
70+
echo -e "\tremove\t- Remove $title."
71+
echo
72+
;;
73+
*)
74+
${module_options["module_homepage,feature"]} ${commands[3]}
75+
;;
76+
esac
77+
}

0 commit comments

Comments
 (0)