mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-14 16:55:00 +01:00
high availability caddy
this was a fucking nightmare. setting up the s3 storage plugin was painful, since caddy plugins are not nicely supported by the nix build yet. rip. oh well, i got it working. and it WORKS
This commit is contained in:
parent
9ce4ff862f
commit
5b2ca88597
19 changed files with 209 additions and 48 deletions
|
|
@ -12,10 +12,15 @@ let
|
|||
vps2 = {
|
||||
A = [ "184.174.32.252" ];
|
||||
};
|
||||
|
||||
combine = hosts: {
|
||||
A = lib.lists.flatten (map (host: if builtins.hasAttr "A" host then host.A else [ ]) hosts);
|
||||
AAAA = lib.lists.flatten (map (host: if builtins.hasAttr "AAAA" host then host.AAAA else [ ]) hosts);
|
||||
};
|
||||
in
|
||||
with hostsToDns;
|
||||
# vps1 contains root noratrieb.dev
|
||||
vps1 // {
|
||||
# vps{1,3,4} contains root noratrieb.dev
|
||||
combine [ vps1 vps3 vps4 ] // {
|
||||
SOA = {
|
||||
nameServer = "ns1.noratrieb.dev.";
|
||||
adminEmail = "void@noratrieb.dev";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue