Skip to content

Commit

Permalink
Software title: Homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
igorpecovnik committed Dec 13, 2024
1 parent 0a257fd commit 10b1802
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 0 deletions.
Binary file added tools/include/images/MAN009.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions tools/include/markdown/MAN009-footer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
=== "Access to the web interface"

The web interface is accessible via port **3000**:

- URL: `https://<your.IP>:3000`
- Username/Password: none

Configuration: Please reffer to official manual https://gethomepage.dev/configs/

=== "Directories"

- Install directory: `/armbian/homepage`
- Site configuration directory: `/armbian/homepage/config`

=== "View logs"

```sh
docker logs -f homepage
```
1 change: 1 addition & 0 deletions tools/include/markdown/MAN009-header.md
Original file line number Diff line number Diff line change
@@ -0,0 +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.
20 changes: 20 additions & 0 deletions tools/json/config.software.json
Original file line number Diff line number Diff line change
Expand Up @@ -1187,6 +1187,26 @@
"status": "Stable",
"author": "@Tearran",
"condition": ""
},
{
"id": "MAN009",
"description": "Install Homepage",
"command": [
"module_homepage install"
],
"status": "Stable",
"author": "@igorpecovnik",
"condition": "! module_homepage status"
},
{
"id": "MAN010",
"description": "Remove Homepage",
"command": [
"module_homepage remove"
],
"status": "Stable",
"author": "@igorpecovnik",
"condition": "module_homepage status"
}
]
}
Expand Down
1 change: 1 addition & 0 deletions tools/modules/runtime/config.runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ update_sub_submenu_data "Software" "Media" "MED026" "http://$LOCALIPADD:${module
update_sub_submenu_data "Software" "Containers" "CON006" "http://$LOCALIPADD:${module_options["module_portainer,port"]}"
update_sub_submenu_data "Software" "HomeAutomation" "HA004" "http://$LOCALIPADD:${module_options["module_haos,port"]}"
update_sub_submenu_data "Software" "Monitoring" "MON004" "http://$LOCALIPADD:${module_options["module_netdata,port"]}"
update_sub_submenu_data "Software" "Management" "MAN010" "http://$LOCALIPADD:${module_options["module_homepage,port"]}"
update_sub_submenu_data "Software" "Downloaders" "DOW002" "http://$LOCALIPADD:${module_options["module_qbittorrent,port"]}"
update_sub_submenu_data "Software" "Downloaders" "DOW004" "http://$LOCALIPADD:${module_options["module_deluge,port"]}"
update_sub_submenu_data "Software" "Downloaders" "DOW006" "http://$LOCALIPADD:${module_options["module_transmission,port"]}"
Expand Down
77 changes: 77 additions & 0 deletions tools/modules/software/install_homepage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
module_options+=(
["module_homepage,author"]="@armbian"
["module_homepage,feature"]="module_homepage"
["module_homepage,desc"]="Install homepage container"
["module_homepage,example"]="install remove status help"
["module_homepage,port"]="3000"
["module_homepage,status"]="Active"
["module_homepage,arch"]=""
)
#
# Module homepage
#
function module_homepage () {
local title="homepage"
local condition=$(which "$title" 2>/dev/null)

if check_if_installed docker-ce; then
local container=$(docker container ls -a | mawk '/homepage?( |$)/{print $1}')
local image=$(docker image ls -a | mawk '/homepage?( |$)/{print $3}')
fi

local commands
IFS=' ' read -r -a commands <<< "${module_options["module_homepage,example"]}"

HOMEPAGE_BASE="${SOFTWARE_FOLDER}/homepage"

case "$1" in
"${commands[0]}")
check_if_installed docker-ce || install_docker
[[ -d "$HOMEPAGE_BASE" ]] || mkdir -p "$HOMEPAGE_BASE" || { echo "Couldn't create storage directory: $HOMEPAGE_BASE"; exit 1; }
docker run -d \
--name homepage \
-e PUID=1000 \
-e PGID=1000 \
-p 3000:3000 \
-v "${HOMEPAGE_BASE}/config:/app/config" \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
--restart unless-stopped \
ghcr.io/gethomepage/homepage:latest
for i in $(seq 1 20); do
if docker inspect -f '{{ index .Config.Labels "build_version" }}' homepage >/dev/null 2>&1 ; then
break
else
sleep 3
fi
if [ $i -eq 20 ] ; then
echo -e "\nTimed out waiting for ${title} to start, consult your container logs for more info (\`docker logs homepage\`)"
exit 1
fi
done
;;
"${commands[1]}")
[[ "${container}" ]] && docker container rm -f "$container" >/dev/null
[[ "${image}" ]] && docker image rm "$image" >/dev/null
[[ -n "${HOMEPAGE_BASE}" && "${HOMEPAGE_BASE}" != "/" ]] && rm -rf "${HOMEPAGE_BASE}"
;;
"${commands[2]}")
if [[ "${container}" && "${image}" ]]; then
return 0
else
return 1
fi
;;
"${commands[3]}")
echo -e "\nUsage: ${module_options["module_homepage,feature"]} <command>"
echo -e "Commands: ${module_options["module_homepage,example"]}"
echo "Available commands:"
echo -e "\tinstall\t- Install $title."
echo -e "\tstatus\t- Installation status $title."
echo -e "\tremove\t- Remove $title."
echo
;;
*)
${module_options["module_homepage,feature"]} ${commands[3]}
;;
esac
}

0 comments on commit 10b1802

Please sign in to comment.