Skip to content

Commit

Permalink
sync latest library changes (#95)
Browse files Browse the repository at this point in the history
* sort and dedupe cspell

* sync latest library changes

* bump versions

* remove debug key

* make executable

* make executable
  • Loading branch information
stavros-k authored Aug 5, 2024
1 parent 284f5a3 commit 3bd3700
Show file tree
Hide file tree
Showing 288 changed files with 3,585 additions and 276 deletions.
105 changes: 55 additions & 50 deletions cspell.config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
words:
- adguard
- aliyun
- allinkl
- altran
- audiobook
- audiobookshelf
- autobrr
- bazarr
- altran
- bitnami
- briefkasten
- changeip
- cifs
- clamav
- clamd
Expand All @@ -20,124 +26,123 @@ words:
- immich
- ipaddr
- cloudflared
- filebrowser
- ipfs
- dockge
- audiobookshelf
- collabora
- adguard
- consts
- cooldown
- cpus
- cuda
- ddns
- aliyun
- allinkl
- changeip
- ddnss
- desec
- dnsmasq
- dnsomatic
- dnspod
- dockge
- dominio
- dondominio
- drawio
- dreamhost
- duckdns
- dynu
- dynv
- easydns
- emby
- filebrowser
- freedns
- freshclamd
- gandi
- godaddy
- goip
- goipde
- hetzner
- hexparrot
- homarr
- hostable
- htpasswd
- icanhazip
- immich
- inkl
- inwx
- ionos
- ipaddr
- ipfs
- ipify
- ipinfo
- ipleak
- drawio
- emby
- briefkasten
- isready
- itzg
- jellyfin
- jellyseerr
- kavita
- komga
- lidarr
- logsearch
- logseq
- luadns
- mangas
- mebibytes
- mineos
- metube
- kavita
- lidarr
- lidarr
- jellyseerr
- logsearch
- mebibytes
- milterd
- luadns
- komga
- mangas
- mineos
- minio
- nextauth
- nocopy
- netdata
- netboot
- netbootxyz
- namecheap
- namecom
- navidrome
- netboot
- netbootxyz
- netcup
- netdata
- nextauth
- nextcloud
- njalla
- nnev
- navidrome
- nocopy
- noip
- nowdns
- openj
- omada
- prowlarr
- sonarr
- opendns
- openvino
- organizr
- overseerr
- palworld
- pgvecto
- photoprism
- pihole
- plexinc
- plexpass
- porkbun
- prowlarr
- proxied
- publicip
- publicipv
- qbittorrent
- radarr
- rcon
- readarr
- sonarr
- startpage
- scandir
- sigdb
- syncthing
- tailscale
- tailscaled
- palworld
- photoprism
- tensorchord
- organizr
- noip
- nowdns
- opendns
- porkbun
- proxied
- publicip
- publicipv
- seeip
- selfhost
- selfhost.de
- selfhostde
- servercow
- shoutrrr
- sigdb
- sonarr
- spdyn
- startpage
- strato
- overseerr
- syncthing
- tailscale
- tailscaled
- tautulli
- tensorchord
- tmpfs
- tracebacklimit
- truenas
- userspace
- unifi
- userspace
- variomedia
- whiteboarding
- wtfismyip
- zoneedit
- whiteboarding
4 changes: 2 additions & 2 deletions ix-dev/community/adguard-home/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ keywords:
- dns
- adblock
lib_version: 1.0.0
lib_version_hash: 66c98111180da566a3bcc9ee1d1be4f673356f453b5d97ee7c784c9a38ee9999
lib_version_hash: f2610d4386f9f2f65b1e69176effe945f2d9cc7b9489e6386de82f1f63986c4e
maintainers:
- email: [email protected]
name: truenas
Expand All @@ -40,4 +40,4 @@ sources:
- https://hub.docker.com/r/adguard/adguardhome
title: AdGuard Home
train: community
version: 1.0.0
version: 1.0.1
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ def pg_test(user, db, config=None):
return f"pg_isready -h {host} -p {port} -d {db} -U {user}"


def redis_test(config=None):
config = config or {}

host = config.get("host", "127.0.0.1")
port = config.get("port", 6379)
password = "$$REDIS_PASSWORD"

return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG"


def curl_test(port, path, config=None):
config = config or {}
if not port or not path:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def pg_container(data={}):
"restart": "unless-stopped",
"cap_drop": get_caps()["drop"],
"security_opt": get_sec_opts(),
**({"dns_opt": dns_opts(data["dns_opt"])} if data.get("dns_opt") else {}),
**({"dns_opts": dns_opts(data["dns_opts"])} if data.get("dns_opts") else {}),
"healthcheck": check_health(pg_test(user=pg_user, db=pg_dbname)),
"environment": pg_env(
user=pg_user,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
from . import utils
from .security import get_caps, get_sec_opts
from .network import dns_opts
from .healthchecks import redis_test, check_health
from .resources import resources


def redis_container(data={}):
req_keys = ["password", "volumes", "resources"]
for key in req_keys:
if not data.get(key):
utils.throw_error(f"Expected [{key}] to be set for postgres")

redis_password = data["password"]
redis_port = data.get("port", 6379)
depends = data.get("depends_on", {})
depends_on = {}
for key in depends:
depends_on[key] = {
"condition": depends[key].get("condition", "service_completed_successfully")
}

return {
"image": f"{data.get('image', 'bitnami/redis:7.0.11')}",
"user": f"{data.get('user', '1001')}:{data.get('group', '0')}",
"restart": "unless-stopped",
"cap_drop": get_caps()["drop"],
"security_opt": get_sec_opts(),
**({"dns_opts": dns_opts(data["dns_opts"])} if data.get("dns_opts") else {}),
"healthcheck": check_health(redis_test(config={"port": redis_port})),
"environment": redis_env(
password=redis_password,
port=redis_port,
),
"volumes": data["volumes"],
"depends_on": depends_on,
"deploy": {"resources": resources(data["resources"])},
}


def redis_env(password, port=6379):
if not password:
utils.throw_error("Expected [password] to be set for redis")

return {
"ALLOW_EMPTY_PASSWORD": "no",
"REDIS_PASSWORD": password,
"REDIS_PORT_NUMBER": port,
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def perms_item(data, values=None, opts=None):

req_keys = ["mount_path", "mode", "uid", "gid"]
for key in req_keys:
if not opts.get(key):
if opts.get(key, None) is None:
utils.throw_error(f"Expected opts passed to [perms_item] to have [{key}] key")

data.update({"mount_path": opts["mount_path"]})
Expand Down
4 changes: 2 additions & 2 deletions ix-dev/community/audiobookshelf/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ keywords:
- media
- audiobook
lib_version: 1.0.0
lib_version_hash: 66c98111180da566a3bcc9ee1d1be4f673356f453b5d97ee7c784c9a38ee9999
lib_version_hash: f2610d4386f9f2f65b1e69176effe945f2d9cc7b9489e6386de82f1f63986c4e
maintainers:
- email: [email protected]
name: truenas
Expand All @@ -33,4 +33,4 @@ sources:
- https://github.com/advplyr/audiobookshelf
title: Audiobookshelf
train: community
version: 1.0.0
version: 1.0.1
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ def pg_test(user, db, config=None):
return f"pg_isready -h {host} -p {port} -d {db} -U {user}"


def redis_test(config=None):
config = config or {}

host = config.get("host", "127.0.0.1")
port = config.get("port", 6379)
password = "$$REDIS_PASSWORD"

return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG"


def curl_test(port, path, config=None):
config = config or {}
if not port or not path:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def pg_container(data={}):
"restart": "unless-stopped",
"cap_drop": get_caps()["drop"],
"security_opt": get_sec_opts(),
**({"dns_opt": dns_opts(data["dns_opt"])} if data.get("dns_opt") else {}),
**({"dns_opts": dns_opts(data["dns_opts"])} if data.get("dns_opts") else {}),
"healthcheck": check_health(pg_test(user=pg_user, db=pg_dbname)),
"environment": pg_env(
user=pg_user,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
from . import utils
from .security import get_caps, get_sec_opts
from .network import dns_opts
from .healthchecks import redis_test, check_health
from .resources import resources


def redis_container(data={}):
req_keys = ["password", "volumes", "resources"]
for key in req_keys:
if not data.get(key):
utils.throw_error(f"Expected [{key}] to be set for postgres")

redis_password = data["password"]
redis_port = data.get("port", 6379)
depends = data.get("depends_on", {})
depends_on = {}
for key in depends:
depends_on[key] = {
"condition": depends[key].get("condition", "service_completed_successfully")
}

return {
"image": f"{data.get('image', 'bitnami/redis:7.0.11')}",
"user": f"{data.get('user', '1001')}:{data.get('group', '0')}",
"restart": "unless-stopped",
"cap_drop": get_caps()["drop"],
"security_opt": get_sec_opts(),
**({"dns_opts": dns_opts(data["dns_opts"])} if data.get("dns_opts") else {}),
"healthcheck": check_health(redis_test(config={"port": redis_port})),
"environment": redis_env(
password=redis_password,
port=redis_port,
),
"volumes": data["volumes"],
"depends_on": depends_on,
"deploy": {"resources": resources(data["resources"])},
}


def redis_env(password, port=6379):
if not password:
utils.throw_error("Expected [password] to be set for redis")

return {
"ALLOW_EMPTY_PASSWORD": "no",
"REDIS_PASSWORD": password,
"REDIS_PORT_NUMBER": port,
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def perms_item(data, values=None, opts=None):

req_keys = ["mount_path", "mode", "uid", "gid"]
for key in req_keys:
if not opts.get(key):
if opts.get(key, None) is None:
utils.throw_error(f"Expected opts passed to [perms_item] to have [{key}] key")

data.update({"mount_path": opts["mount_path"]})
Expand Down
Loading

0 comments on commit 3bd3700

Please sign in to comment.