Merge pull request 'open-webui: removed network service. add version option' (#2) from develop into release-25.11
All checks were successful
Deploy docs / build-and-deploy (push) Successful in 5s
All checks were successful
Deploy docs / build-and-deploy (push) Successful in 5s
Reviewed-on: #2
This commit is contained in:
commit
aea241d610
1 changed files with 7 additions and 17 deletions
|
|
@ -42,6 +42,12 @@ in
|
|||
{
|
||||
options.services.open-webui-oci = {
|
||||
enable = mkEnableOption "Open WebUI container with Podman.";
|
||||
version = mkOption {
|
||||
type = types.str;
|
||||
default = "main";
|
||||
example = "v0.8.5";
|
||||
description = "Container version string.";
|
||||
};
|
||||
externalUrl = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
|
|
@ -87,7 +93,7 @@ in
|
|||
virtualisation.oci-containers.backend = "podman";
|
||||
|
||||
virtualisation.oci-containers.containers."open-webui" = {
|
||||
image = "ghcr.io/open-webui/open-webui:main";
|
||||
image = "ghcr.io/open-webui/open-webui:${cfg.version}";
|
||||
environment =
|
||||
defaultEnv
|
||||
// cfg.environment
|
||||
|
|
@ -116,11 +122,9 @@ in
|
|||
Restart = mkOverride 90 "always";
|
||||
};
|
||||
after = [
|
||||
"podman-network-open-webui_default.service"
|
||||
"podman-volume-open-webui_open-webui.service"
|
||||
];
|
||||
requires = [
|
||||
"podman-network-open-webui_default.service"
|
||||
"podman-volume-open-webui_open-webui.service"
|
||||
];
|
||||
partOf = [
|
||||
|
|
@ -131,20 +135,6 @@ in
|
|||
];
|
||||
};
|
||||
|
||||
systemd.services."podman-network-open-webui_default" = {
|
||||
path = [ pkgs.podman ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
ExecStop = "podman network rm -f open-webui_default";
|
||||
};
|
||||
script = ''
|
||||
podman network inspect open-webui_default || podman network create open-webui_default
|
||||
'';
|
||||
partOf = [ "podman-compose-open-webui-root.target" ];
|
||||
wantedBy = [ "podman-compose-open-webui-root.target" ];
|
||||
};
|
||||
|
||||
systemd.services."podman-volume-open-webui_open-webui" = {
|
||||
path = [ pkgs.podman ];
|
||||
serviceConfig = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue