Skip to content

Commit

Permalink
Expose all ports for portainer and add show URL in the menu
Browse files Browse the repository at this point in the history
  • Loading branch information
igorpecovnik committed Nov 28, 2024
1 parent ae6def0 commit 10af2c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions tools/modules/runtime/config.runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,5 @@ update_sub_submenu_data "Software" "Media" "SW24" "https://localhost:$emby_media
plex_media_port="$(lsof -i -P -n | grep TCP | grep LISTEN | grep 'plex' | awk -F: '{print $2}' | awk '{print $1}' | head -n 1)"
update_sub_submenu_data "Software" "Media" "SW22" "https://localhost:$plex_media_port"

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"]}"
7 changes: 6 additions & 1 deletion tools/modules/software/install_portainer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module_options+=(
["module_portainer,desc"]="Install/uninstall/check status of portainer container"
["module_portainer,example"]="help install uninstall status"
["module_portainer,status"]="Active"
["module_portainer,port"]="9000"
)
#
# Install portainer container
Expand Down Expand Up @@ -37,7 +38,11 @@ module_portainer() {
install)
check_if_installed docker-ce || install_docker
docker volume ls -q | grep -xq 'portainer_data' || docker volume create portainer_data
docker run -d -p '9002:9000' --name=portainer --restart=always \
docker run -d \
-p '9000:9000' \
-p '8000:8000' \
-p '9443:9443' \
--name=portainer --restart=always \
-v '/run/docker.sock:/var/run/docker.sock' \
-v '/etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt:ro' \
-v 'portainer_data:/data' 'portainer/portainer-ce'
Expand Down

0 comments on commit 10af2c8

Please sign in to comment.