remove homepage and blog containers
This commit is contained in:
parent
789618480e
commit
62cec2dc10
2 changed files with 2 additions and 96 deletions
|
|
@ -9,69 +9,5 @@ in
|
||||||
{
|
{
|
||||||
# Container definitions for vps host
|
# Container definitions for vps host
|
||||||
virtualisation.oci-containers.containers = {
|
virtualisation.oci-containers.containers = {
|
||||||
# Static web server for homepage
|
|
||||||
homepage = {
|
|
||||||
image = "docker.io/nginx:alpine";
|
|
||||||
|
|
||||||
volumes = [
|
|
||||||
"/home/yanlin/www/homepage:/usr/share/nginx/html:ro"
|
|
||||||
"/home/yanlin/www/homepage-nginx.conf:/etc/nginx/conf.d/default.conf:ro"
|
|
||||||
];
|
|
||||||
|
|
||||||
labels = {
|
|
||||||
"traefik.enable" = "true";
|
|
||||||
"traefik.http.routers.homepage.rule" = "Host(`www.yanlincs.com`)";
|
|
||||||
"traefik.http.routers.homepage.entrypoints" = "websecure";
|
|
||||||
"traefik.http.routers.homepage.tls" = "true";
|
|
||||||
"traefik.http.routers.homepage.tls.certresolver" = "cloudflare";
|
|
||||||
"traefik.http.routers.homepage.tls.domains[0].main" = "yanlincs.com";
|
|
||||||
"traefik.http.routers.homepage.tls.domains[0].sans[0]" = "*.yanlincs.com";
|
|
||||||
"traefik.http.services.homepage.loadbalancer.server.port" = "80";
|
|
||||||
};
|
|
||||||
|
|
||||||
extraOptions = [
|
|
||||||
"--network=podman"
|
|
||||||
];
|
|
||||||
|
|
||||||
autoStart = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Static web server for blog
|
|
||||||
blog = {
|
|
||||||
image = "docker.io/nginx:alpine";
|
|
||||||
|
|
||||||
volumes = [
|
|
||||||
"/home/yanlin/www/blog:/usr/share/nginx/html:ro"
|
|
||||||
"/home/yanlin/www/blog-nginx.conf:/etc/nginx/conf.d/default.conf:ro"
|
|
||||||
];
|
|
||||||
|
|
||||||
labels = {
|
|
||||||
"traefik.enable" = "true";
|
|
||||||
"traefik.http.routers.blog.rule" = "Host(`blog.yanlincs.com`)";
|
|
||||||
"traefik.http.routers.blog.entrypoints" = "websecure";
|
|
||||||
"traefik.http.routers.blog.tls" = "true";
|
|
||||||
"traefik.http.routers.blog.tls.certresolver" = "cloudflare";
|
|
||||||
"traefik.http.routers.blog.tls.domains[0].main" = "*.yanlincs.com";
|
|
||||||
"traefik.http.services.blog.loadbalancer.server.port" = "80";
|
|
||||||
};
|
|
||||||
|
|
||||||
extraOptions = [
|
|
||||||
"--network=podman"
|
|
||||||
];
|
|
||||||
|
|
||||||
autoStart = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# OC Backend Scheduler
|
|
||||||
oc-scheduler = {
|
|
||||||
image = "localhost/oc-scheduler:v1";
|
|
||||||
|
|
||||||
extraOptions = [
|
|
||||||
"--network=podman"
|
|
||||||
"--security-opt=no-new-privileges:true"
|
|
||||||
];
|
|
||||||
|
|
||||||
autoStart = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,20 +5,6 @@
|
||||||
services.traefik.dynamicConfigOptions = {
|
services.traefik.dynamicConfigOptions = {
|
||||||
http = {
|
http = {
|
||||||
routers = {
|
routers = {
|
||||||
# Redirect from yanlincs.com to www.yanlincs.com
|
|
||||||
homepage-redirect = {
|
|
||||||
rule = "Host(`yanlincs.com`)";
|
|
||||||
entrypoints = "websecure";
|
|
||||||
service = "homepage-redirect";
|
|
||||||
middlewares = [ "homepage-redirect" ];
|
|
||||||
tls = {
|
|
||||||
certResolver = "cloudflare";
|
|
||||||
domains = [{
|
|
||||||
main = "yanlincs.com";
|
|
||||||
sans = [ "www.yanlincs.com" ];
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Photo service (Immich)
|
# Photo service (Immich)
|
||||||
photo = {
|
photo = {
|
||||||
|
|
@ -113,14 +99,6 @@
|
||||||
|
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
# Redirect service
|
|
||||||
homepage-redirect = {
|
|
||||||
loadBalancer = {
|
|
||||||
servers = [{
|
|
||||||
url = "http://localhost:1"; # Dummy backend, won't be used due to redirect
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Photo service backend (via WireGuard)
|
# Photo service backend (via WireGuard)
|
||||||
photo = {
|
photo = {
|
||||||
|
|
@ -186,16 +164,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
middlewares = {
|
|
||||||
# Redirect middleware
|
middlewares = { };
|
||||||
homepage-redirect = {
|
|
||||||
redirectRegex = {
|
|
||||||
regex = "^https://yanlincs\\.com/(.*)";
|
|
||||||
replacement = "https://www.yanlincs.com/$1";
|
|
||||||
permanent = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue