allow all containers, add bind mounts
Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
parent
4d352a0b52
commit
f6bda933ea
@ -66,8 +66,9 @@
|
|||||||
# where image-uri gets passed in to the container-spec function as a custom
|
# where image-uri gets passed in to the container-spec function as a custom
|
||||||
# parameter, and scale is an integer that generates the containers
|
# parameter, and scale is an integer that generates the containers
|
||||||
#
|
#
|
||||||
# container-spec must be a function which accepts one parameter (the
|
# container-spec must be a function which accepts two parameter (the
|
||||||
# container name) and ideally returns an oci-compliant container.
|
# container name and image name) and ideally returns an oci-compliant
|
||||||
|
# container.
|
||||||
#
|
#
|
||||||
# args:
|
# args:
|
||||||
# containers: an AttrSet which specifies the imageUri and scale of each
|
# containers: an AttrSet which specifies the imageUri and scale of each
|
||||||
@ -75,17 +76,23 @@
|
|||||||
# container-spec: a function which produces an oci-compliant container spec
|
# container-spec: a function which produces an oci-compliant container spec
|
||||||
#
|
#
|
||||||
# type:
|
# type:
|
||||||
# AttrSet -> (AttrSet -> AttrSet) -> AttrSet
|
# AttrSet -> (String -> AttrSet -> AttrSet) -> AttrSet
|
||||||
createTemplatedContainers =
|
createTemplatedContainers =
|
||||||
containers: container-spec:
|
containers: container-spec:
|
||||||
builtins.listToAttrs (
|
builtins.listToAttrs (
|
||||||
lib.flatten (
|
lib.flatten (
|
||||||
lib.mapAttrsToList (
|
lib.mapAttrsToList (
|
||||||
name: value:
|
name: value:
|
||||||
(map (num: {
|
(map (
|
||||||
name = "${name}-${parseInt num}";
|
num:
|
||||||
value = container-spec value.image;
|
let
|
||||||
}) (lib.lists.range 1 value.scale))
|
container-name = "${name}-${toString num}";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
name = container-name;
|
||||||
|
value = container-spec container-name value.image;
|
||||||
|
}
|
||||||
|
) (lib.lists.range 1 value.scale))
|
||||||
) containers
|
) containers
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -11,98 +11,99 @@ let
|
|||||||
image = "imgur-grab";
|
image = "imgur-grab";
|
||||||
scale = 1;
|
scale = 1;
|
||||||
};
|
};
|
||||||
#archiveteam-telegram = {
|
archiveteam-telegram = {
|
||||||
# image = "telegram-grab";
|
image = "telegram-grab";
|
||||||
# scale = 3;
|
scale = 3;
|
||||||
#};
|
|
||||||
#archiveteam-reddit = {
|
|
||||||
# image = "reddit-grab";
|
|
||||||
# scale = 1;
|
|
||||||
#};
|
|
||||||
#archiveteam-dpreview = {
|
|
||||||
# image = "dpreview-grab";
|
|
||||||
# scale = 0;
|
|
||||||
#};
|
|
||||||
#archiveteam-issuu = {
|
|
||||||
# image = "issuu-grab";
|
|
||||||
# scale = 0;
|
|
||||||
#};
|
|
||||||
#archiveteam-urls = {
|
|
||||||
# image = "urls-grab";
|
|
||||||
# scale = 2;
|
|
||||||
#};
|
|
||||||
#archiveteam-urlteam = {
|
|
||||||
# image = "terroroftinytown-client-grab";
|
|
||||||
# scale = 2;
|
|
||||||
#};
|
|
||||||
#archiveteam-mediafire = {
|
|
||||||
# image = "mediafire-grab";
|
|
||||||
# scale = 1;
|
|
||||||
#};
|
|
||||||
#archiveteam-github = {
|
|
||||||
# image = "github-grab";
|
|
||||||
# scale = 1;
|
|
||||||
#};
|
|
||||||
#archiveteam-lineblog = {
|
|
||||||
# image = "lineblog-grab";
|
|
||||||
# scale = 0;
|
|
||||||
#};
|
|
||||||
#archiveteam-banciyuan = {
|
|
||||||
# image = "banciyuan-grab";
|
|
||||||
# scale = 0;
|
|
||||||
#};
|
|
||||||
#archiveteam-wysp = {
|
|
||||||
# image = "wysp-grab";
|
|
||||||
# scale = 0;
|
|
||||||
#};
|
|
||||||
#archiveteam-xuite = {
|
|
||||||
# image = "xuite-grab";
|
|
||||||
# scale = 0;
|
|
||||||
#};
|
|
||||||
#archiveteam-gfycat = {
|
|
||||||
# image = "gfycat-grab";
|
|
||||||
# scale = 0;
|
|
||||||
#};
|
|
||||||
#archiveteam-skyblog = {
|
|
||||||
# image = "skyblog-grab";
|
|
||||||
# scale = 0;
|
|
||||||
#};
|
|
||||||
#archiveteam-zowa = {
|
|
||||||
# image = "zowa-grab";
|
|
||||||
# scale = 0;
|
|
||||||
#};
|
|
||||||
#archiveteam-blogger = {
|
|
||||||
# image = "blogger-grab";
|
|
||||||
# scale = 0;
|
|
||||||
#};
|
|
||||||
#archiveteam-vbox7 = {
|
|
||||||
# image = "vbox7-grab";
|
|
||||||
# scale = 0;
|
|
||||||
#};
|
|
||||||
#archiveteam-pastebin = {
|
|
||||||
# image = "pastebin-grab";
|
|
||||||
# scale = 1;
|
|
||||||
#};
|
|
||||||
#archiveteam-youtube = {
|
|
||||||
# image = "youtube-grab";
|
|
||||||
# scale = 1;
|
|
||||||
#};
|
|
||||||
#archiveteam-deviantart = {
|
|
||||||
# image = "deviantart-grab";
|
|
||||||
# scale = 1;
|
|
||||||
#};
|
|
||||||
#archiveteam-postnews = {
|
|
||||||
# image = "postnews-grab";
|
|
||||||
# scale = 1;
|
|
||||||
#};
|
|
||||||
};
|
};
|
||||||
container-spec = container: {
|
archiveteam-reddit = {
|
||||||
|
image = "reddit-grab";
|
||||||
|
scale = 1;
|
||||||
|
};
|
||||||
|
archiveteam-dpreview = {
|
||||||
|
image = "dpreview-grab";
|
||||||
|
scale = 0;
|
||||||
|
};
|
||||||
|
archiveteam-issuu = {
|
||||||
|
image = "issuu-grab";
|
||||||
|
scale = 0;
|
||||||
|
};
|
||||||
|
archiveteam-urls = {
|
||||||
|
image = "urls-grab";
|
||||||
|
scale = 2;
|
||||||
|
};
|
||||||
|
archiveteam-urlteam = {
|
||||||
|
image = "terroroftinytown-client-grab";
|
||||||
|
scale = 2;
|
||||||
|
};
|
||||||
|
archiveteam-mediafire = {
|
||||||
|
image = "mediafire-grab";
|
||||||
|
scale = 1;
|
||||||
|
};
|
||||||
|
archiveteam-github = {
|
||||||
|
image = "github-grab";
|
||||||
|
scale = 1;
|
||||||
|
};
|
||||||
|
archiveteam-lineblog = {
|
||||||
|
image = "lineblog-grab";
|
||||||
|
scale = 0;
|
||||||
|
};
|
||||||
|
archiveteam-banciyuan = {
|
||||||
|
image = "banciyuan-grab";
|
||||||
|
scale = 0;
|
||||||
|
};
|
||||||
|
archiveteam-wysp = {
|
||||||
|
image = "wysp-grab";
|
||||||
|
scale = 0;
|
||||||
|
};
|
||||||
|
archiveteam-xuite = {
|
||||||
|
image = "xuite-grab";
|
||||||
|
scale = 0;
|
||||||
|
};
|
||||||
|
archiveteam-gfycat = {
|
||||||
|
image = "gfycat-grab";
|
||||||
|
scale = 0;
|
||||||
|
};
|
||||||
|
archiveteam-skyblog = {
|
||||||
|
image = "skyblog-grab";
|
||||||
|
scale = 0;
|
||||||
|
};
|
||||||
|
archiveteam-zowa = {
|
||||||
|
image = "zowa-grab";
|
||||||
|
scale = 0;
|
||||||
|
};
|
||||||
|
archiveteam-blogger = {
|
||||||
|
image = "blogger-grab";
|
||||||
|
scale = 0;
|
||||||
|
};
|
||||||
|
archiveteam-vbox7 = {
|
||||||
|
image = "vbox7-grab";
|
||||||
|
scale = 0;
|
||||||
|
};
|
||||||
|
archiveteam-pastebin = {
|
||||||
|
image = "pastebin-grab";
|
||||||
|
scale = 1;
|
||||||
|
};
|
||||||
|
archiveteam-youtube = {
|
||||||
|
image = "youtube-grab";
|
||||||
|
scale = 1;
|
||||||
|
};
|
||||||
|
archiveteam-deviantart = {
|
||||||
|
image = "deviantart-grab";
|
||||||
|
scale = 1;
|
||||||
|
};
|
||||||
|
archiveteam-postnews = {
|
||||||
|
image = "postnews-grab";
|
||||||
|
scale = 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
container-spec = container-name: container: {
|
||||||
image = "atdr.meo.ws/archiveteam/${container}";
|
image = "atdr.meo.ws/archiveteam/${container}";
|
||||||
extraOptions = [ "--stop-signal=SIGINT" ];
|
extraOptions = [ "--stop-signal=SIGINT" ];
|
||||||
labels = {
|
labels = {
|
||||||
"com.centurylinklabs.watchtower.enable" = "true";
|
"com.centurylinklabs.watchtower.enable" = "true";
|
||||||
"com.centurylinklabs.watchtower.scope" = "archiveteam";
|
"com.centurylinklabs.watchtower.scope" = "archiveteam";
|
||||||
};
|
};
|
||||||
|
volumes = [ "/ZFS/ZFS-primary/archiveteam/${container-name}:/grab/data" ];
|
||||||
log-driver = "local";
|
log-driver = "local";
|
||||||
cmd = lib.splitString " " "--concurrent 6 AmAnd0";
|
cmd = lib.splitString " " "--concurrent 6 AmAnd0";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user