1
0
Fork 0

Docker: Setup watchtower

This commit is contained in:
Daniel Kempkens 2022-08-05 00:40:11 +02:00
parent 844cdcaffb
commit 3c6cd95a91
4 changed files with 48 additions and 6 deletions

View file

@ -32,6 +32,9 @@ in
"/run:exec,size=64M"
"/var/log:size=32M"
];
labels = {
"com.centurylinklabs.watchtower.enable" = "true";
};
};
};
@ -56,6 +59,9 @@ in
"/run:exec,size=64M"
"/var/log:size=32M"
];
labels = {
"com.centurylinklabs.watchtower.enable" = "true";
};
};
};
@ -85,6 +91,9 @@ in
"/run:exec,size=64M"
"/var/log"
];
labels = {
"com.centurylinklabs.watchtower.enable" = "true";
};
};
};
@ -108,6 +117,9 @@ in
tmpfs = [
"/run:rw,nosuid,nodev,exec,relatime,size=64M,uid=1000,gid=1000"
];
labels = {
"com.centurylinklabs.watchtower.enable" = "true";
};
};
};
@ -124,6 +136,9 @@ in
"MLAT" = "yes";
"FR24KEY" = secret.container.adsb.fr24feed.key;
};
labels = {
"com.centurylinklabs.watchtower.enable" = "true";
};
};
};
@ -148,6 +163,9 @@ in
"/run:exec,size=64M"
"/var/log"
];
labels = {
"com.centurylinklabs.watchtower.enable" = "true";
};
};
};
};

View file

@ -19,6 +19,9 @@ in
volumes = [
"/var/run/docker.sock:/var/run/docker.sock:ro"
];
labels = {
"com.centurylinklabs.watchtower.enable" = "true";
};
};
};
@ -34,6 +37,9 @@ in
volumes = [
"/etc/container-webserver/mosquitto:/mosquitto/config:ro"
];
labels = {
"com.centurylinklabs.watchtower.enable" = "true";
};
};
};
@ -76,6 +82,7 @@ in
"traefik.http.routers.ifconfig-sexy.tls" = "true";
"traefik.http.routers.ifconfig-sexy.tls.certresolver" = "cfresolver";
"traefik.http.routers.ifconfig-sexy.middlewares" = "non-www-redirect@file, content-compression@file";
"com.centurylinklabs.watchtower.enable" = "true";
};
};
};
@ -95,6 +102,7 @@ in
"traefik.http.routers.nifoc-pw-docs.tls.domains[0].main" = "nifoc.pw";
"traefik.http.routers.nifoc-pw-docs.tls.domains[0].sans" = "*.nifoc.pw";
"traefik.http.routers.nifoc-pw-docs.middlewares" = "content-compression@file";
"com.centurylinklabs.watchtower.enable" = "true";
};
};
};

View file

@ -5,12 +5,28 @@
pkgs.arion
];
virtualisation.docker = {
enable = true;
autoPrune.enable = true;
};
virtualisation = {
docker = {
enable = true;
autoPrune.enable = true;
};
virtualisation.arion = {
backend = "docker";
oci-containers = {
backend = "docker";
containers.watchtower = {
image = "containrrr/watchtower";
environment = {
WATCHTOWER_POLL_INTERVAL = "28800";
WATCHTOWER_LABEL_ENABLE = "true";
WATCHTOWER_NO_RESTART = "true";
};
volumes = [ "/var/run/docker.sock:/var/run/docker.sock" ];
};
};
arion = {
backend = "docker";
};
};
}