From e3c70e2f709438cc133d154b4f468b207b46e51f Mon Sep 17 00:00:00 2001 From: kjong Date: Wed, 4 Mar 2020 21:03:39 -0800 Subject: [PATCH 1/5] size --- modules/services.sh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/modules/services.sh b/modules/services.sh index 1d41ecae6..272c6bdbb 100644 --- a/modules/services.sh +++ b/modules/services.sh @@ -394,6 +394,44 @@ function services { get_port $service_name ;; + size) + case "$service_name" in + planet) + curl -s -H "Authorization: JWT " "https://hub.docker.com/v2/repositories/treehouses/planet/tags/?page_size=100" | jq -r '.results[] | select(.name == "latest") | .images[0].size' | numfmt --to=iec + ;; + kolibri) + curl -s -H "Authorization: JWT " "https://hub.docker.com/v2/repositories/treehouses/kolibri/tags/?page_size=100" | jq -r '.results[] | select(.name == "latest") | .images[0].size' | numfmt --to=iec + ;; + pihole) + curl -s -H "Authorization: JWT " "https://hub.docker.com/v2/repositories/pihole/pihole/tags/?page_size=100" | jq -r '.results[] | select(.name == "latest") | .images[0].size' | numfmt --to=iec + ;; + moodle) + curl -s -H "Authorization: JWT " "https://hub.docker.com/v2/repositories/treehouses/moodle/tags/?page_size=100" | jq -r '.results[] | select(.name == "latest") | .images[0].size' | numfmt --to=iec + ;; + privatebin) + curl -s -H "Authorization: JWT " "https://hub.docker.com/v2/repositories/treehouses/privatebin/tags/?page_size=100" | jq -r '.results[] | select(.name == "latest") | .images[0].size' | numfmt --to=iec + ;; + nextcloud) + curl -s -H "Authorization: JWT " "https://hub.docker.com/v2/repositories/library/nextcloud/tags/?page_size=100" | jq -r '.results[] | select(.name == "latest") | .images[0].size' | numfmt --to=iec + ;; + portainer) + curl -s -H "Authorization: JWT " "https://hub.docker.com/v2/repositories/portainer/portainer/tags/?page_size=100" | jq -r '.results[] | select(.name == "latest") | .images[0].size' | numfmt --to=iec + ;; + netdata) + curl -s -H "Authorization: JWT " "https://hub.docker.com/v2/repositories/treehouses/netdata/tags/?page_size=100" | jq -r '.results[] | select(.name == "latest") | .images[0].size' | numfmt --to=iec + ;; + mastodon) + curl -s -H "Authorization: JWT " "https://hub.docker.com/v2/repositories/treehouses/mastodon/tags/?page_size=100" | jq -r '.results[] | select(.name == "latest") | .images[0].size' | numfmt --to=iec + ;; + ntopng) + curl -s -H "Authorization: JWT " "https://hub.docker.com/v2/repositories/jonbackhaus/ntopng/tags/?page_size=100" | jq -r '.results[] | select(.name == "latest") | .images[0].size' | numfmt --to=iec + ;; + *) + echo "unknown service" + ;; + esac + ;; + *) echo "unknown command" ;; From a93e5693530ab21878255fecdfc1662a03b28f5f Mon Sep 17 00:00:00 2001 From: kjong Date: Wed, 4 Mar 2020 21:07:40 -0800 Subject: [PATCH 2/5] netdata mastodon fix --- modules/services.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/services.sh b/modules/services.sh index 272c6bdbb..3c88b9480 100644 --- a/modules/services.sh +++ b/modules/services.sh @@ -136,13 +136,13 @@ function services { check_tor "9000" ;; netdata) - check_space "treehouses/netdata" + check_space "netdata/netdata" create_yml "netdata" docker_compose_up "netdata" check_tor "19999" ;; mastodon) - check_space "treehouses/mastodon" + check_space "gilir/rpi-mastodon" create_yml "mastodon" docker_compose_up "mastodon" check_tor "3000" @@ -418,10 +418,10 @@ function services { curl -s -H "Authorization: JWT " "https://hub.docker.com/v2/repositories/portainer/portainer/tags/?page_size=100" | jq -r '.results[] | select(.name == "latest") | .images[0].size' | numfmt --to=iec ;; netdata) - curl -s -H "Authorization: JWT " "https://hub.docker.com/v2/repositories/treehouses/netdata/tags/?page_size=100" | jq -r '.results[] | select(.name == "latest") | .images[0].size' | numfmt --to=iec + curl -s -H "Authorization: JWT " "https://hub.docker.com/v2/repositories/netdata/netdata/tags/?page_size=100" | jq -r '.results[] | select(.name == "latest") | .images[0].size' | numfmt --to=iec ;; mastodon) - curl -s -H "Authorization: JWT " "https://hub.docker.com/v2/repositories/treehouses/mastodon/tags/?page_size=100" | jq -r '.results[] | select(.name == "latest") | .images[0].size' | numfmt --to=iec + curl -s -H "Authorization: JWT " "https://hub.docker.com/v2/repositories/gilir/rpi-mastodon/tags/?page_size=100" | jq -r '.results[] | select(.name == "latest") | .images[0].size' | numfmt --to=iec ;; ntopng) curl -s -H "Authorization: JWT " "https://hub.docker.com/v2/repositories/jonbackhaus/ntopng/tags/?page_size=100" | jq -r '.results[] | select(.name == "latest") | .images[0].size' | numfmt --to=iec From 0394bc6b240f30be64bfd774db7aabb4765e5532 Mon Sep 17 00:00:00 2001 From: kjong Date: Wed, 4 Mar 2020 21:13:57 -0800 Subject: [PATCH 3/5] update help --- modules/services.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/services.sh b/modules/services.sh index 3c88b9480..852066a2d 100644 --- a/modules/services.sh +++ b/modules/services.sh @@ -589,11 +589,13 @@ function services_help { echo " ..... down" echo " ..... start" echo " ..... stop" + echo " ..... restart" echo " ..... autorun [true|false]" echo " ..... ps" + echo " ..... info" echo " ..... url " echo " ..... port" - echo " ..... info" + echo " ..... size" echo echo " up builds and starts " echo @@ -603,12 +605,16 @@ function services_help { echo echo " stop stops " echo + echo " restart restarts " + echo echo " autorun outputs true if is set to autorun or false otherwise" echo " [true] sets autorun to true" echo " [false] sets autorun to false" echo echo " ps outputs the containers related to " echo + echo " info gives some information about " + echo echo " url " echo " lists the local url for " echo " lists the tor url for " @@ -616,7 +622,7 @@ function services_help { echo echo " port lists the ports used by " echo - echo " info gives some information about " + echo " size outputs the size of " echo echo " Examples:" echo From 0a5435b6f4c86ad3ac7929838c2030836b1109fc Mon Sep 17 00:00:00 2001 From: kjong Date: Wed, 4 Mar 2020 21:32:33 -0800 Subject: [PATCH 4/5] couchdb --- modules/services.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/services.sh b/modules/services.sh index 852066a2d..eeef6ea60 100644 --- a/modules/services.sh +++ b/modules/services.sh @@ -426,6 +426,9 @@ function services { ntopng) curl -s -H "Authorization: JWT " "https://hub.docker.com/v2/repositories/jonbackhaus/ntopng/tags/?page_size=100" | jq -r '.results[] | select(.name == "latest") | .images[0].size' | numfmt --to=iec ;; + couchdb) + curl -s -H "Authorization: JWT " "https://hub.docker.com/v2/repositories/treehouses/couchdb/tags/?page_size=100" | jq -r '.results[] | select(.name == "latest") | .images[0].size' | numfmt --to=iec + ;; *) echo "unknown service" ;; From 8ce5956a0872511796f0c0e62d22b54a6febc066 Mon Sep 17 00:00:00 2001 From: dogi Date: Thu, 5 Mar 2020 01:52:19 -0500 Subject: [PATCH 5/5] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fd7d69424..e34220159 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@treehouses/cli", - "version": "1.13.38", + "version": "1.13.41", "remote": "2069", "description": "Thin command-line interface for Raspberry Pi low level configuration.", "main": "cli.sh",