custom image
This commit is contained in:
@@ -1,13 +1,16 @@
|
|||||||
{ config, lib, serverCfg }:
|
{ config, lib, serverCfg }:
|
||||||
let
|
let
|
||||||
builder =
|
builder =
|
||||||
{ image, secret ? null
|
{ image, imageStream ? null
|
||||||
|
, secret ? null
|
||||||
, subdomain ? null, ip ? null, port ? 0
|
, subdomain ? null, ip ? null, port ? 0
|
||||||
, extraEnv ? { }, extraLabels ? { }, extraOptions ? [ ]
|
, extraEnv ? { }, extraLabels ? { }, extraOptions ? [ ]
|
||||||
, overrides ? { }
|
, overrides ? { }
|
||||||
}:
|
}:
|
||||||
let base = {
|
let base = {
|
||||||
inherit image;
|
image = if imageStream != null then "${imageStream.imageName}:${imageStream.imageTag}"
|
||||||
|
else image;
|
||||||
|
imageStream = imageStream;
|
||||||
|
|
||||||
environmentFiles = if secret!=null then [ config.sops.secrets."${lib.toUpper secret}".path ] else [];
|
environmentFiles = if secret!=null then [ config.sops.secrets."${lib.toUpper secret}".path ] else [];
|
||||||
environment = {} // extraEnv;
|
environment = {} // extraEnv;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ in {
|
|||||||
server = builder.mkContainer {
|
server = builder.mkContainer {
|
||||||
subdomain = containerCfg.subdomain;
|
subdomain = containerCfg.subdomain;
|
||||||
# image = "ghcr.io/traefik/traefik:${version}";
|
# image = "ghcr.io/traefik/traefik:${version}";
|
||||||
imageStream = image;
|
image = image;
|
||||||
ip = containerCfg.ip;
|
ip = containerCfg.ip;
|
||||||
port = 8080;
|
port = 8080;
|
||||||
secret = name;
|
secret = name;
|
||||||
|
|||||||
Reference in New Issue
Block a user