diff options
| author | Fuwn <[email protected]> | 2024-10-07 21:37:45 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-10-07 21:37:45 -0700 |
| commit | b7739d2d110ab82089fdf52b51f32c3e2f2e7c0f (patch) | |
| tree | f4d4174f504cd9de33e9fd07819312fca54f9762 /modules/server/virtualisation | |
| parent | containers: move port to variable (diff) | |
| download | nixos-config-b7739d2d110ab82089fdf52b51f32c3e2f2e7c0f.tar.xz nixos-config-b7739d2d110ab82089fdf52b51f32c3e2f2e7c0f.zip | |
dozzle: expose to the world
Diffstat (limited to 'modules/server/virtualisation')
| -rw-r--r-- | modules/server/virtualisation/containers/dozzle.nix | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/modules/server/virtualisation/containers/dozzle.nix b/modules/server/virtualisation/containers/dozzle.nix index e692cf7..fc7695b 100644 --- a/modules/server/virtualisation/containers/dozzle.nix +++ b/modules/server/virtualisation/containers/dozzle.nix @@ -1,11 +1,21 @@ { config, ... }: +let + port = builtins.toString 8091; +in { + services.caddy.virtualHosts."dozzle.fuwn.me".extraConfig = "reverse_proxy localhost:${port}"; + virtualisation.oci-containers.containers.dozzle = { inherit (config.modules.containers) extraOptions; image = "amir20/dozzle:latest"; autoStart = true; - ports = [ "127.0.0.1:8091:8080" ]; + ports = [ "127.0.0.1:${port}:8080" ]; + + cmd = [ + "--auth-provider=simple" + "--auth-ttl=48h" + ]; volumes = let @@ -15,6 +25,9 @@ else "/var/run/docker.sock"; in - [ "${hostSocket}:/var/run/docker.sock" ]; + [ + "${hostSocket}:/var/run/docker.sock" + "/mnt/docker/dozzle:/data/" + ]; }; } |