1
0
Fork 0

adsb: Move to podman and remove arion

This commit is contained in:
Daniel Kempkens 2023-03-19 13:04:48 +01:00
parent 84b6a38492
commit 4f68c3c328
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
5 changed files with 124 additions and 146 deletions

View file

@ -1,11 +0,0 @@
{
systemd.tmpfiles.rules = [
"d /etc/container-adsb 0755 root root"
"d /etc/container-adsb/readsb 0755 1000 1000"
"d /etc/container-adsb/readsb/autogain 0755 1000 1000"
"d /etc/container-adsb/tar1090 0755 1000 1000"
"d /etc/container-adsb/tar1090/heatmap 0755 1000 1000"
];
}

View file

@ -1,147 +1,131 @@
let let
secret = import ../../secret/container/adsb; secret = import ../../secret/container/adsb;
custom-config = import ./config.nix;
in in
{ {
virtualisation.arion.projects.adsb.settings = { virtualisation.oci-containers.containers = {
services = { readsb = {
readsb = { image = "ghcr.io/sdr-enthusiasts/docker-readsb-protobuf:latest";
service = { environment = {
image = "ghcr.io/sdr-enthusiasts/docker-readsb-protobuf:latest"; "TZ" = "Europe/Berlin";
container_name = "readsb"; "DISABLE_PERFORMANCE_GRAPHS" = "true";
hostname = "readsb"; "DISABLE_WEBAPP" = "true";
restart = "unless-stopped"; "READSB_NET_ENABLE" = "true";
environment = { "READSB_DCFILTER" = "true";
"TZ" = "Europe/Berlin"; "READSB_FIX" = "true";
"DISABLE_PERFORMANCE_GRAPHS" = "true"; "READSB_GAIN" = "autogain";
"DISABLE_WEBAPP" = "true"; "READSB_LAT" = secret.container.adsb.readsb.lat;
"READSB_NET_ENABLE" = "true"; "READSB_LON" = secret.container.adsb.readsb.lon;
"READSB_DCFILTER" = "true"; "READSB_MODEAC" = "true";
"READSB_FIX" = "true"; "READSB_RX_LOCATION_ACCURACY" = "2";
"READSB_GAIN" = "autogain";
"READSB_LAT" = secret.container.adsb.readsb.lat;
"READSB_LON" = secret.container.adsb.readsb.lon;
"READSB_MODEAC" = "true";
"READSB_RX_LOCATION_ACCURACY" = "2";
};
devices = [ "/dev/bus/usb:/dev/bus/usb" ];
volumes = [
"/etc/container-adsb/readsb/autogain:/run/autogain"
];
tmpfs = [
"/run:exec,size=64M"
"/var/log:size=32M"
];
labels = {
"com.centurylinklabs.watchtower.enable" = "true";
};
};
}; };
volumes = [
"/etc/container-adsb/readsb/autogain:/run/autogain"
];
extraOptions = [
"--device=/dev/bus/usb:/dev/bus/usb"
"--tmpfs=/run:exec,size=64M"
"--tmpfs=/var/log:size=32M"
"--label=com.centurylinklabs.watchtower.enable=true"
"--label=io.containers.autoupdate=registry"
];
};
mlathub = { mlathub = {
service = { image = "ghcr.io/sdr-enthusiasts/docker-readsb-protobuf:latest";
image = "ghcr.io/sdr-enthusiasts/docker-readsb-protobuf:latest"; dependsOn = [ "readsb" "piaware" ];
container_name = "mlathub"; environment = {
hostname = "mlathub"; "TZ" = "Europe/Berlin";
restart = "unless-stopped"; "DISABLE_PERFORMANCE_GRAPHS" = "true";
depends_on = [ "readsb" "piaware" ]; "DISABLE_WEBAPP" = "true";
environment = { "READSB_NET_ENABLE" = "true";
"TZ" = "Europe/Berlin"; "READSB_NET_ONLY" = "true";
"DISABLE_PERFORMANCE_GRAPHS" = "true"; "READSB_FORWARD_MLAT" = "true";
"DISABLE_WEBAPP" = "true"; "READSB_NET_CONNECTOR" = "piaware,30105,beast_in";
"READSB_NET_ENABLE" = "true"; "READSB_NET_BEAST_OUTPUT_PORT" = "30105";
"READSB_NET_ONLY" = "true";
"READSB_FORWARD_MLAT" = "true";
"READSB_NET_CONNECTOR" = "piaware,30105,beast_in";
"READSB_NET_BEAST_OUTPUT_PORT" = "30105";
};
tmpfs = [
"/run:exec,size=64M"
"/var/log:size=32M"
];
labels = {
"com.centurylinklabs.watchtower.enable" = "true";
};
};
}; };
extraOptions = [
"--tmpfs=/run:exec,size=64M"
"--tmpfs=/var/log:size=32M"
"--label=com.centurylinklabs.watchtower.enable=true"
"--label=io.containers.autoupdate=registry"
];
};
tar1090 = { tar1090 = {
service = { image = "ghcr.io/sdr-enthusiasts/docker-tar1090:latest";
image = "ghcr.io/sdr-enthusiasts/docker-tar1090:latest"; dependsOn = [ "readsb" "mlathub" ];
container_name = "tar1090"; ports = [ "8081:80" ];
restart = "unless-stopped"; environment = {
depends_on = [ "readsb" "mlathub" ]; "TZ" = "Europe/Berlin";
ports = [ "8081:80" ]; "BEASTHOST" = "readsb";
environment = { "BEASTPORT" = "30005";
"TZ" = "Europe/Berlin"; "MLATHOST" = "mlathub";
"BEASTHOST" = "readsb"; "MLATPORT" = "30105";
"BEASTPORT" = "30005"; "LAT" = secret.container.adsb.readsb.lat;
"MLATHOST" = "mlathub"; "LONG" = secret.container.adsb.readsb.lon;
"MLATPORT" = "30105"; "HEYWHATSTHAT_PANORAMA_ID" = secret.container.adsb.tar1090.heywhatsthatId;
"LAT" = secret.container.adsb.readsb.lat; "TAR1090_FLIGHTAWARELINKS" = "true";
"LONG" = secret.container.adsb.readsb.lon; "TAR1090_DISPLAYUNITS" = "metric";
"HEYWHATSTHAT_PANORAMA_ID" = secret.container.adsb.tar1090.heywhatsthatId;
"TAR1090_FLIGHTAWARELINKS" = "true";
"TAR1090_DISPLAYUNITS" = "metric";
};
volumes = [
"/etc/container-adsb/tar1090/heatmap:/var/globe_history"
];
tmpfs = [
"/run:exec,size=64M"
"/var/log"
];
labels = {
"com.centurylinklabs.watchtower.enable" = "true";
};
};
}; };
volumes = [
"/etc/container-adsb/tar1090/heatmap:/var/globe_history"
];
extraOptions = [
"--tmpfs=/run:exec,size=64M"
"--tmpfs=/var/log"
"--label=com.centurylinklabs.watchtower.enable=true"
"--label=io.containers.autoupdate=registry"
];
};
fr24feed = { fr24feed = {
service = { image = "ghcr.io/sdr-enthusiasts/docker-flightradar24:latest";
image = "ghcr.io/sdr-enthusiasts/docker-flightradar24:latest"; dependsOn = [ "readsb" ];
container_name = "fr24feed"; environment = {
restart = "unless-stopped"; "TZ" = "Europe/Berlin";
depends_on = [ "readsb" ]; "BEASTHOST" = "readsb";
environment = { "BEASTPORT" = "30005";
"TZ" = "Europe/Berlin"; "MLAT" = "yes";
"BEASTHOST" = "readsb"; "FR24KEY" = secret.container.adsb.fr24feed.key;
"BEASTPORT" = "30005";
"MLAT" = "yes";
"FR24KEY" = secret.container.adsb.fr24feed.key;
};
labels = {
"com.centurylinklabs.watchtower.enable" = "true";
};
};
}; };
extraOptions = [
"--tmpfs=/run:exec,size=64M"
"--tmpfs=/var/log"
"--label=com.centurylinklabs.watchtower.enable=true"
"--label=io.containers.autoupdate=registry"
];
};
piaware = { piaware = {
service = { image = "ghcr.io/sdr-enthusiasts/docker-piaware:latest";
image = "ghcr.io/sdr-enthusiasts/docker-piaware:latest"; dependsOn = [ "readsb" ];
container_name = "piaware"; environment = {
restart = "unless-stopped"; "TZ" = "Europe/Berlin";
depends_on = [ "readsb" ]; "RECEIVER_TYPE" = "relay";
environment = { "BEASTHOST" = "readsb";
"TZ" = "Europe/Berlin"; "BEASTPORT" = "30005";
"RECEIVER_TYPE" = "relay"; "ALLOW_MLAT" = "yes";
"BEASTHOST" = "readsb"; "MLAT_RESULTS" = "yes";
"BEASTPORT" = "30005"; "LAT" = secret.container.adsb.readsb.lat;
"ALLOW_MLAT" = "yes"; "LONG" = secret.container.adsb.readsb.lon;
"MLAT_RESULTS" = "yes"; "FEEDER_ID" = secret.container.adsb.piaware.feederId;
"LAT" = secret.container.adsb.readsb.lat;
"LONG" = secret.container.adsb.readsb.lon;
"FEEDER_ID" = secret.container.adsb.piaware.feederId;
};
tmpfs = [
"/run:exec,size=64M"
"/var/log"
];
labels = {
"com.centurylinklabs.watchtower.enable" = "true";
};
};
}; };
extraOptions = [
"--tmpfs=/run:exec,size=64M"
"--tmpfs=/var/log"
"--label=com.centurylinklabs.watchtower.enable=true"
"--label=io.containers.autoupdate=registry"
];
}; };
}; };
} // custom-config
systemd.tmpfiles.rules = [
"d /etc/container-adsb 0755 root root"
"d /etc/container-adsb/readsb 0755 1000 1000"
"d /etc/container-adsb/readsb/autogain 0755 1000 1000"
"d /etc/container-adsb/tar1090 0755 1000 1000"
"d /etc/container-adsb/tar1090/heatmap 0755 1000 1000"
];
}

View file

@ -44,6 +44,11 @@
}; };
}; };
networking.firewall.interfaces."podman+" = {
allowedUDPPorts = [ 443 ];
allowedTCPPorts = [ 443 ];
};
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"d /etc/container-matrix/signald 0775 0 0" "d /etc/container-matrix/signald 0775 0 0"
"d /etc/container-matrix/signal 0775 1337 1337" "d /etc/container-matrix/signal 0775 1337 1337"

View file

@ -14,7 +14,7 @@ in
../nixos/git.nix ../nixos/git.nix
(import ../nixos/arion.nix (args // { inherit secret; })) ../nixos/arion.nix
../../container/adsb ../../container/adsb
]; ];

View file

@ -25,7 +25,7 @@
}; };
networking.firewall.interfaces."podman+" = { networking.firewall.interfaces."podman+" = {
allowedUDPPorts = [ 53 443 ]; allowedUDPPorts = [ 53 ];
allowedTCPPorts = [ 53 443 ]; allowedTCPPorts = [ 53 ];
}; };
} }