34 lines
918 B
Nix
34 lines
918 B
Nix
{lib, ...}: let
|
|
serviceName = "portainer";
|
|
portUtils = import ../../../../lib/port-utils.nix {inherit lib;};
|
|
servicePort = portUtils.getPort serviceName "AZ-CLD-1";
|
|
in {
|
|
virtualisation.oci-containers.containers.${serviceName} = {
|
|
image = "docker.io/portainer/portainer-ce:latest";
|
|
ports = ["127.0.0.1:${toString servicePort}:9000"];
|
|
volumes = [
|
|
"/etc/localtime:/etc/localtime:ro"
|
|
"/run/podman/podman.sock:/var/run/docker.sock:ro"
|
|
"portainer_data:/data"
|
|
];
|
|
};
|
|
|
|
# Traefik configuration
|
|
services.traefik.dynamicConfigOptions.http = {
|
|
services.${serviceName}.loadBalancer.servers = [
|
|
{
|
|
url = "http://localhost:${toString servicePort}/";
|
|
}
|
|
];
|
|
|
|
routers.${serviceName} = {
|
|
rule = "Host(`pt.az-gruppe.com`)";
|
|
tls = {
|
|
certResolver = "ionos";
|
|
};
|
|
service = serviceName;
|
|
entrypoints = "websecure";
|
|
};
|
|
};
|
|
}
|