add dockge
This commit is contained in:
parent
8de4110dfe
commit
81a70b3bb7
4 changed files with 36 additions and 6 deletions
27
modules/system/homelab/containers.nix
Normal file
27
modules/system/homelab/containers.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{ ... }: let
|
||||||
|
stacks-dir = "/opt/stacks";
|
||||||
|
in {
|
||||||
|
virtualisation = {
|
||||||
|
oci-containers.backend = "docker";
|
||||||
|
docker = {
|
||||||
|
enable = true;
|
||||||
|
autoPrune.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
virtualisation.oci-containers.containers."dockge" = {
|
||||||
|
image = "louislam/dockge:latest";
|
||||||
|
environment = {
|
||||||
|
"DOCKGE_STACKS_DIR" = stacks-dir;
|
||||||
|
};
|
||||||
|
volumes = [
|
||||||
|
"${stacks-dir}:${stacks-dir}:rw"
|
||||||
|
"/root/dockge:/app/data:rw"
|
||||||
|
"/var/run/docker.sock:/var/run/docker.sock:rw"
|
||||||
|
];
|
||||||
|
ports = [
|
||||||
|
"127.0.0.1:5001:5001/tcp"
|
||||||
|
];
|
||||||
|
log-driver = "journald";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -57,6 +57,7 @@
|
||||||
[ "AdGuardHome" "adguard" "https://dns.proxy.${homelab.domain}" "http://localhost:8088/" ]
|
[ "AdGuardHome" "adguard" "https://dns.proxy.${homelab.domain}" "http://localhost:8088/" ]
|
||||||
[ "ApacheHTTPD" "apache" "https://cdn.proxy.${homelab.domain}" "http://localhost:3000/" ]
|
[ "ApacheHTTPD" "apache" "https://cdn.proxy.${homelab.domain}" "http://localhost:3000/" ]
|
||||||
[ "Forgejo" "forgejo" "https://git.proxy.${homelab.domain}" "http://localhost:5080/" ]
|
[ "Forgejo" "forgejo" "https://git.proxy.${homelab.domain}" "http://localhost:5080/" ]
|
||||||
|
[ "Dockge" "docker" "https://containers.proxy.${homelab.domain}" "http://localhost:5001/" ]
|
||||||
];
|
];
|
||||||
bookmarks = [
|
bookmarks = [
|
||||||
[ "Tailscale" "tailscale" "https://login.tailscale.com/" ]
|
[ "Tailscale" "tailscale" "https://login.tailscale.com/" ]
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
{ homelab, lib, ... }: let
|
{ homelab, lib, ... }: let
|
||||||
base = "proxy.${homelab.domain}";
|
base = "proxy.${homelab.domain}";
|
||||||
proxyMappings = {
|
proxyMappings = {
|
||||||
"dns" = { dest = "http://localhost:8088"; auth = true; };
|
"containers" = { dest = "http://localhost:5001"; auth = false; };
|
||||||
"cdn" = { dest = "http://localhost:3000"; auth = false; };
|
"auth" = { dest = "http://localhost:1411"; auth = false; };
|
||||||
"auth" = { dest = "http://localhost:1411"; auth = false; };
|
"dns" = { dest = "http://localhost:8088"; auth = true; };
|
||||||
"git" = { dest = "http://localhost:5080"; auth = false; };
|
"cdn" = { dest = "http://localhost:3000"; auth = false; };
|
||||||
"@" = { dest = "http://localhost:5070"; auth = false; };
|
"git" = { dest = "http://localhost:5080"; auth = false; };
|
||||||
|
"@" = { dest = "http://localhost:5070"; auth = false; };
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
users.users.nginx.extraGroups = [ "acme" ];
|
users.users.nginx.extraGroups = [ "acme" ];
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
{ lib, ... }: {
|
{ ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
|
./homelab/containers.nix
|
||||||
./homelab/share.nix
|
./homelab/share.nix
|
||||||
./homelab/proxy.nix
|
./homelab/proxy.nix
|
||||||
./homelab/dash.nix
|
./homelab/dash.nix
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue