[terakoda.com] Moves www2 to the main site.

This commit is contained in:
2025-06-09 16:04:08 -07:00
parent d432ef8014
commit 6601377ece
2 changed files with 14 additions and 31 deletions

View File

@@ -7,7 +7,10 @@ let
blazestar
;
mkStaticSite =
host:
{
host,
dir ? "public",
}:
let
cleanHost = lib.strings.stringAsChars (c: if c == "." then "-" else c) host;
in
@@ -16,7 +19,7 @@ let
image = "nginx:alpine";
autoStart = true;
volumes = [
"/tank/web/${host}/public:/usr/share/nginx/html:ro"
"/tank/web/${host}/${dir}:/usr/share/nginx/html:ro"
];
labels = {
"traefik.enable" = "true";
@@ -33,27 +36,10 @@ let
in
{
virtualisation.oci-containers.containers =
mkStaticSite terakoda
// mkStaticSite havenisms
// mkStaticSite blazestar
// (
let
host = "www2.terakoda.com";
cleanHost = lib.strings.stringAsChars (c: if c == "." then "-" else c) host;
in
{
"${cleanHost}-static" = {
image = "nginx:alpine";
autoStart = true;
volumes = [
"/tank/web/www2.terakoda.com/dist:/usr/share/nginx/html:ro"
];
labels = {
"traefik.enable" = "true";
"traefik.http.routers.${cleanHost}.rule" = "Host(`${host}`)";
"traefik.http.services.${cleanHost}.loadbalancer.server.port" = "80";
};
};
}
);
mkStaticSite {
host = terakoda;
dir = "dist";
}
// mkStaticSite { host = havenisms; }
// mkStaticSite { host = blazestar; };
}