testing docker network
This commit is contained in:
parent
831b37d5e4
commit
f6b16013e0
@ -1,3 +1,4 @@
|
|||||||
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./filebrowser.nix
|
./filebrowser.nix
|
||||||
@ -6,4 +7,13 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
virtualisation.oci-containers.backend = "docker";
|
virtualisation.oci-containers.backend = "docker";
|
||||||
|
|
||||||
|
system.activationScripts.mkVPN =
|
||||||
|
let
|
||||||
|
docker = config.virtualisation.oci-containers.backend;
|
||||||
|
dockerBin = "${pkgs.${docker}}/bin/${docker}";
|
||||||
|
in
|
||||||
|
''
|
||||||
|
${dockerBin} network inspect web >/dev/null 2>&1 || ${dockerBin} network create web --subnet 172.20.0.0/16
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
@ -1,29 +1,10 @@
|
|||||||
{
|
{
|
||||||
virtualisation.oci-containers.containers = {
|
virtualisation.oci-containers.containers = {
|
||||||
qbit = {
|
|
||||||
image = "ghcr.io/linuxserver/qbittorrent";
|
|
||||||
ports = [
|
|
||||||
"6881:6881"
|
|
||||||
"6881:6881/udp"
|
|
||||||
"8082:8082"
|
|
||||||
"29432:29432"
|
|
||||||
];
|
|
||||||
volumes = [
|
|
||||||
"/ZFS/Media/Docker/Docker/Storage/qbit:/config"
|
|
||||||
"/ZFS/Torenting/Qbit/:/data"
|
|
||||||
];
|
|
||||||
environment = {
|
|
||||||
PUID = "998";
|
|
||||||
PGID = "100";
|
|
||||||
TZ = "America/New_York";
|
|
||||||
WEBUI_PORT = "8082";
|
|
||||||
};
|
|
||||||
autoStart = true;
|
|
||||||
};
|
|
||||||
grafana = {
|
grafana = {
|
||||||
image = "grafana/grafana-enterprise";
|
image = "grafana/grafana-enterprise";
|
||||||
volumes = [ "/ZFS/Media/Docker/Docker/Storage/grafana:/var/lib/grafana" ];
|
volumes = [ "/ZFS/Media/Docker/Docker/Storage/grafana:/var/lib/grafana" ];
|
||||||
user = "998:998";
|
user = "998:998";
|
||||||
|
extraOptions = [ "--network=web" ];
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
};
|
};
|
||||||
dnd_file_server = {
|
dnd_file_server = {
|
||||||
@ -32,6 +13,7 @@
|
|||||||
"/ZFS/Media/Docker/Docker/templates/file_server/sites/:/etc/apache2/sites-enabled/"
|
"/ZFS/Media/Docker/Docker/templates/file_server/sites/:/etc/apache2/sites-enabled/"
|
||||||
"/ZFS/Storage/Main/Table_Top/:/data"
|
"/ZFS/Storage/Main/Table_Top/:/data"
|
||||||
];
|
];
|
||||||
|
extraOptions = [ "--network=web" ];
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
};
|
};
|
||||||
arch_mirror = {
|
arch_mirror = {
|
||||||
@ -41,6 +23,7 @@
|
|||||||
"/ZFS/Media/Mirror/:/data"
|
"/ZFS/Media/Mirror/:/data"
|
||||||
];
|
];
|
||||||
ports = [ "800:80" ];
|
ports = [ "800:80" ];
|
||||||
|
extraOptions = [ "--network=web" ];
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
};
|
};
|
||||||
haproxy = {
|
haproxy = {
|
||||||
@ -59,6 +42,7 @@
|
|||||||
"arch_mirror"
|
"arch_mirror"
|
||||||
"dnd_file_server"
|
"dnd_file_server"
|
||||||
];
|
];
|
||||||
|
extraOptions = [ "--network=web" ];
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
};
|
};
|
||||||
cloud_flare_tunnel = {
|
cloud_flare_tunnel = {
|
||||||
@ -69,6 +53,7 @@
|
|||||||
];
|
];
|
||||||
environmentFiles = [ "/ZFS/Media/Docker/Docker/jeeves/web/cloudflare_tunnel.env" ];
|
environmentFiles = [ "/ZFS/Media/Docker/Docker/jeeves/web/cloudflare_tunnel.env" ];
|
||||||
dependsOn = [ "haproxy" ];
|
dependsOn = [ "haproxy" ];
|
||||||
|
extraOptions = [ "--network=web" ];
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user