-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* whoogle: use v2 * fix test and add labels * whoops * init * m * wordpress: use v2 * lib * fix descv * syncthing: use v2 * update lib * add home dir * fix setup container * v2-lib: rocm device * fix validation * handle rocm * rm old * regen hash * ix-app: use v2 * rm old
- Loading branch information
Showing
120 changed files
with
6,224 additions
and
1,407 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,8 @@ home: https://www.truenas.com/ | |
host_mounts: [] | ||
icon: https://media.sys.truenas.net/apps/ix-chart/icons/icon.webp | ||
keywords: [] | ||
lib_version: 1.1.7 | ||
lib_version_hash: d05e43e25b7dc1736be6cc1efa4b9255368aa346e3e7a4350a38440f29b73186 | ||
lib_version: 2.0.34 | ||
lib_version_hash: 54c507c0a47e2a10aee421ec5a67c04f73692bd865d4d5057f57711e322a7951 | ||
maintainers: | ||
- email: [email protected] | ||
name: truenas | ||
|
@@ -19,4 +19,4 @@ screenshots: [] | |
sources: [] | ||
title: iX App | ||
train: stable | ||
version: 1.0.14 | ||
version: 1.1.0 |
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 |
---|---|---|
@@ -1,73 +1,90 @@ | ||
services: | ||
{{ values.ix_context.app_name }}: | ||
{# Image Configuration #} | ||
image: {{ "%s:%s" | format(values.image.repository, (values.image.tag or "latest")) }} | ||
|
||
{# Container Configuration #} | ||
restart: {{ values.restart_policy }} | ||
tty: {{ values.tty }} | ||
stdin_open: {{ values.stdin }} | ||
|
||
{% if values.entrypoint %} | ||
entrypoint: {{ values.entrypoint | tojson }} | ||
{% endif %} | ||
|
||
{% if values.command %} | ||
command: {{ values.command | tojson }} | ||
{% endif %} | ||
|
||
{% if values.disable_builtin_healthcheck %} | ||
healthcheck: {"disable": true} | ||
{% endif %} | ||
|
||
environment: {{ ix_lib.base.environment.envs(app={}, user=values.envs, values={"TZ": values.TZ}) | tojson }} | ||
{# Network Configuration #} | ||
{% if values.dns_config.nameservers %} | ||
dns: {{ values.dns_config.nameservers | tojson }} | ||
{% endif %} | ||
|
||
{% if values.dns_config.searches %} | ||
dns_search: {{ values.dns_config.searches | tojson }} | ||
{% endif %} | ||
|
||
{% if values.dns_config.options %} | ||
dns_opt: {{ ix_lib.base.network.dns_opts(values.dns_config.options) | tojson }} | ||
{% endif %} | ||
|
||
{% if values.host_network %} | ||
network_mode: host | ||
{% endif %} | ||
|
||
{% if not values.host_network and values.ports %} | ||
ports: | ||
{% for port in values.ports %} | ||
- {{ ix_lib.base.ports.get_port(port=port) | tojson }} | ||
{% endfor %} | ||
{% endif %} | ||
|
||
{# Security Context Configuration #} | ||
privileged: {{ values.privileged }} | ||
{% set caps = ix_lib.base.security.get_caps(add=values.capabilities.add, drop=[]) %} | ||
{% if caps.add %} | ||
cap_add: {{ caps.add | tojson }} | ||
{% endif %} | ||
|
||
{% if values.run_as_custom_user %} | ||
user: {{ "%d:%d" | format(values.run_as.user, values.run_as.group) }} | ||
{% endif %} | ||
|
||
{# Storage Configuration #} | ||
{% if values.storage %} | ||
volumes: | ||
{% for store in values.storage %} | ||
- {{ ix_lib.base.storage.storage_item(data=store, values=values).vol_mount | tojson }} | ||
{% endfor %} | ||
{% endif %} | ||
|
||
{# Resources Configuration #} | ||
deploy: | ||
resources: {{ ix_lib.base.resources.resources(values.resources, not values.resources.enable_resource_limits) | tojson }} | ||
devices: {{ ix_lib.base.resources.get_devices(values.resources) | tojson }} | ||
|
||
x-portals: {{ ix_lib.base.metadata.get_portals(values.portals) | tojson }} | ||
x-notes: {{ ix_lib.base.metadata.get_notes("iX App") | tojson }} | ||
{# Adjust values to library will pick some things automatically #} | ||
{% do values.update({ | ||
"skip_generic_variables": true, | ||
"images": { | ||
"image": { | ||
"repository": values.image.repository, | ||
"tag": values.image.tag or "latest", | ||
} | ||
}, | ||
"network": { | ||
"dns_opts": values.dns_config.get("options", []), | ||
"dns_searches": values.dns_config.get("searches", []), | ||
"dns_nameservers": values.dns_config.get("nameservers", []), | ||
} | ||
}) %} | ||
|
||
{% for label in values.labels %} | ||
{% do label.update({"containers": [values.ix_context.app_name]}) %} | ||
{% endfor %} | ||
|
||
{# Any manipulation to values should be done before this point #} | ||
|
||
{# Template starts here #} | ||
{% set tpl = ix_lib.base.render.Render(values) %} | ||
|
||
{# Image Configuration #} | ||
{% set c1 = tpl.add_container(values.ix_context.app_name, "image") %} | ||
{% do c1.set_pull_policy(values.image.pull_policy) %} | ||
|
||
{# Container Configuration #} | ||
{% if values.restart_policy == "on-failure" %} | ||
{% do c1.restart.set_policy(values.restart_policy, values.max_retry_count) %} | ||
{% else %} | ||
{% do c1.restart.set_policy(values.restart_policy) %} | ||
{% endif %} | ||
|
||
{% do c1.set_tty(values.tty) %} | ||
{% do c1.set_stdin(values.stdin) %} | ||
|
||
{% if values.entrypoint %} | ||
{% do c1.set_entrypoint(values.entrypoint) %} | ||
{% endif %} | ||
|
||
{% if values.command %} | ||
{% do c1.set_command(values.command) %} | ||
{% endif %} | ||
|
||
{% if values.disable_builtin_healthcheck %} | ||
{% do c1.healthcheck.disable() %} | ||
{% else %} | ||
{% do c1.healthcheck.use_built_in() %} | ||
{% endif %} | ||
|
||
{% do c1.environment.add_env("TZ", values.TZ) %} | ||
{% do c1.environment.add_user_envs(values.envs) %} | ||
|
||
{# Network Configuration #} | ||
{% if values.host_network %} | ||
{% do c1.set_network_mode("host") %} | ||
{% else %} | ||
{% if values.ports %} | ||
{% for port in values.ports %} | ||
{% do c1.ports.add_port(port.published, port.target, {"protocol": port.protocol}) %} | ||
{% endfor %} | ||
{% endif %} | ||
{% endif %} | ||
|
||
{# Security Context Configuration #} | ||
{% do c1.set_privileged(values.privileged) %} | ||
{% do c1.clear_caps() %} | ||
{% do c1.remove_security_opt("no-new-privileges") %} | ||
|
||
{% do c1.add_caps(values.capabilities.add) %} | ||
{% if values.run_as_custom_user %} | ||
{% do c1.set_user(values.run_as.user, values.run_as.group) %} | ||
{% endif %} | ||
|
||
{% for store in values.storage %} | ||
{% do c1.add_storage(store.mount_path, store) %} | ||
{% endfor %} | ||
|
||
{% if not values.resources.enable_resource_limits %} | ||
{% do c1.deploy.resources.remove_cpus_and_memory() %} | ||
{% endif %} | ||
|
||
{% for portal in values.portals %} | ||
{% do tpl.portals.add_portal(portal) %} | ||
{% endfor %} | ||
|
||
{{ tpl.render() | tojson }} |
98 changes: 0 additions & 98 deletions
98
ix-dev/stable/ix-app/templates/library/base_v1_1_7/environment.py
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.