diff --git a/modules/containers/default.nix b/modules/containers/default.nix index e40264d..20b6d3f 100644 --- a/modules/containers/default.nix +++ b/modules/containers/default.nix @@ -1,10 +1,10 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { imports = [ ./katzencafe-wiki.nix ./phtanumb-wiki.nix ./calckey.nix ./penpot.nix ./nextcloud.nix + ./wordpress-schule.nix ]; } diff --git a/modules/containers/wordpress-schule.nix b/modules/containers/wordpress-schule.nix new file mode 100644 index 0000000..16914c5 --- /dev/null +++ b/modules/containers/wordpress-schule.nix @@ -0,0 +1,38 @@ +{...}: { + containers."schule-wp" = { + autoStart = true; + privateNetwork = true; + hostAddress = "10.0.4.1"; + localAddress = "10.0.4.2"; + bindMounts = { + "/var/wp" = { + hostPath = "/schule-wp"; + isReadOnly = false; + }; + }; + config = { + config, + pkgs, + ... + }: { + services.wordpress = { + sites."schule" = { + virtualHost = { + hostName = "wp.schule.katzen.cafe"; + adminAddr = "schule@schrottkatze.de"; + listen = [ + { + ip = "10.0.4.2"; + port = 80; + ssl = false; + } + ]; + }; + }; + }; + system.stateVersion = "23.11"; + }; + }; + deployment.keys = { + }; +} diff --git a/modules/proxy.nix b/modules/proxy.nix index f214ab2..81cb09b 100644 --- a/modules/proxy.nix +++ b/modules/proxy.nix @@ -58,6 +58,10 @@ group = "nginx"; keyType = "rsa4096"; }; + "wp.schule.katzen.cafe" = { + group = "nginx"; + keyType = "rsa4096"; + }; # "prosody.katzen.cafe" = { # group = "prosody"; # keyType = "rsa4096"; @@ -204,6 +208,13 @@ add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always; ''; }; + "wp.schule.katzen.cafe" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://10.0.4.2"; + }; + }; }; }; }