-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* sort and dedupe cspell * sync latest library changes * bump versions * remove debug key * make executable * make executable
- Loading branch information
Showing
288 changed files
with
3,585 additions
and
276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
ix-dev/community/adguard-home/templates/library/base_v1_0_0/redis.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -33,4 +33,4 @@ sources: | |
- https://github.com/advplyr/audiobookshelf | ||
title: Audiobookshelf | ||
train: community | ||
version: 1.0.0 | ||
version: 1.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
ix-dev/community/audiobookshelf/templates/library/base_v1_0_0/redis.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.