2024-05-01 17:49:03 +02:00
|
|
|
{pkgs, ...}: {
|
|
|
|
project.name = "headscale";
|
|
|
|
|
|
|
|
networks.dmz = {
|
|
|
|
name = "dmz";
|
|
|
|
external = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
services = {
|
|
|
|
headscale.service = {
|
|
|
|
image = "headscale/headscale:0.22.3-debug";
|
|
|
|
container_name = "headscale";
|
|
|
|
restart = "always";
|
|
|
|
command = "headscale serve";
|
|
|
|
labels = {
|
|
|
|
"traefik.enable" = "true";
|
2024-05-03 12:19:35 +02:00
|
|
|
|
|
|
|
"traefik.http.services.headscale.loadbalancer.server.port" = "8080";
|
|
|
|
"traefik.http.routers.headscale.service" = "headscale";
|
2024-05-01 17:49:03 +02:00
|
|
|
"traefik.http.routers.headscale.entrypoints" = "websecure-external";
|
|
|
|
"traefik.http.routers.headscale.rule" = "Host(`headscale.ghoscht.com`)";
|
|
|
|
"traefik.http.routers.headscale.tls" = "true";
|
|
|
|
"traefik.http.routers.headscale.tls.certresolver" = "letsencrypt";
|
2024-05-03 12:19:35 +02:00
|
|
|
|
|
|
|
# "traefik.http.services.headscale-external.loadbalancer.server.port" = "8080";
|
|
|
|
# "traefik.http.routers.headscale-external.service" = "headscale-external";
|
|
|
|
# "traefik.http.routers.headscale-external.rule" = "Host(`headscale.ghoscht.com`)";
|
|
|
|
# "traefik.http.routers.headscale-external.entrypoints" = "websecure";
|
|
|
|
# "traefik.http.routers.headscale-external.tls" = "true";
|
|
|
|
# "traefik.http.routers.headscale-external.tls.certresolver" = "letsencrypt";
|
2024-05-01 17:49:03 +02:00
|
|
|
};
|
|
|
|
volumes = [
|
|
|
|
"/storage/dataset/docker/headscale/headscale_config:/etc/headscale"
|
|
|
|
"/storage/dataset/docker/headscale/headscale_data:/var/lib/headscale"
|
|
|
|
];
|
|
|
|
networks = [
|
|
|
|
"dmz"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
headscale-ui.service = {
|
|
|
|
image = "ghcr.io/gurucomputing/headscale-ui:2024.02.24-beta1";
|
|
|
|
container_name = "headscale-ui";
|
|
|
|
restart = "always";
|
|
|
|
labels = {
|
|
|
|
"traefik.enable" = "true";
|
|
|
|
"traefik.http.routers.headscale-ui.entrypoints" = "websecure";
|
|
|
|
"traefik.http.routers.headscale-ui.rule" = "PathPrefix(`/web`)&&Host(`headscale.ghoscht.com`)";
|
|
|
|
"traefik.http.services.headscale-ui.loadbalancer.server.port" = "80";
|
|
|
|
"traefik.http.routers.headscale-ui.tls" = "true";
|
|
|
|
"traefik.http.routers.headscale-ui.tls.certresolver" = "letsencrypt";
|
|
|
|
};
|
|
|
|
networks = [
|
|
|
|
"dmz"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|