From edba35fea979ba470d7b802bbf3a69749f37b5de Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Sun, 5 Jan 2020 20:18:32 +0100 Subject: [PATCH] Add discourse capitaine landing page --- .../private/monitoring/objects_immae-eu.nix | 5 --- .../capitaines/discourse_static/discourse.png | Bin 0 -> 2440 bytes .../capitaines/discourse_static/index.html | 28 +++++++++++++++ .../websites/capitaines/production.nix | 34 +++++++++++++----- 4 files changed, 54 insertions(+), 13 deletions(-) create mode 100644 modules/private/websites/capitaines/discourse_static/discourse.png create mode 100644 modules/private/websites/capitaines/discourse_static/index.html diff --git a/modules/private/monitoring/objects_immae-eu.nix b/modules/private/monitoring/objects_immae-eu.nix index 3dda999..a1d1adb 100644 --- a/modules/private/monitoring/objects_immae-eu.nix +++ b/modules/private/monitoring/objects_immae-eu.nix @@ -110,11 +110,6 @@ in } #### Web scenarios - { - service_description = "discourse website is running on discourse.capitaines.fr"; - freshness_threshold = "1800"; - } - { service_description = "Default website site is running on ns208507.ip-188-165-209.eu"; freshness_threshold = "1800"; diff --git a/modules/private/websites/capitaines/discourse_static/discourse.png b/modules/private/websites/capitaines/discourse_static/discourse.png new file mode 100644 index 0000000000000000000000000000000000000000..91ce42d50db9f2a53e0e656fe77e492e60872739 GIT binary patch literal 2440 zcmbW3`Bzid7J%=)Ni;?j5HPf;!J>l20xfNo){>x%4+JbCgRO~AEKqRH~+$=f(!LrZsV2QrmL5P*Dee5|12oJDk{9jyPMB1%@^~E zODpf(dvyPiprX2=vZk@Bw&`J=@KL?+QBPfUb#;xAhL+me+Pb>B`uci-K+w?8(Ad~0 z6bf6~I-YcOcRcIq>Xtkk?S3JZypZ+w{@wqwZ{XGIH?IeV28X3XMn;`%(tyN2b}9p_WhH z*?5>oq^Th7>A-F6r3k6lVZi2mDS5A}!H{PEY|ERi^*25gru76Ug;UiFn6m0y*RZ#WNXpOV$DhJqbSy2Aj9KZKg$RL%k13@Os@;Bep=ju#zb3FzLeD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Rwk_UUGH5%4;R1Yd5X!}<&*&| zglyfVw*|x45NJ0@vy~~YQdv-;)?Mg62Jd<=U*AFvPu=Y*9&$VgPP@s{3(+`Z3z#ud=$z8AJ~8=0&>t^I9NMeQzbSqv1;O*$RLF~PqeY(5XUp=Z4> zTp~VF`>(pPnLHt<+BmNJj9bQxuR4C4Q31F1zTFGGK{sbV^C3^nQg1k$ZR0*XOvghAony_LYyeH4hT!pTw*cn}$`L~&5)TS# zkWsz80Itsw=li_qvsh-WFcz>MXf}Aa7&lEO0t09$kFdpy9ol>{83iiz<=> + + + + This instance is now closed - Discourse + + + +
+ Discourse capitaines +

Sorry, this instance is closed now.

+
+ + diff --git a/modules/private/websites/capitaines/production.nix b/modules/private/websites/capitaines/production.nix index 044ff1d..ee1698b 100644 --- a/modules/private/websites/capitaines/production.nix +++ b/modules/private/websites/capitaines/production.nix @@ -1,17 +1,15 @@ { lib, pkgs, config, ... }: let - cfg = config.myServices.websites.capitaines.production; - env = config.myEnv.websites.capitaines; - webappName = "capitaines_mastodon"; - root = "/run/current-system/webapps/${webappName}"; - siteDir = ./mastodon_static; + cfg = config.myServices.websites.capitaines.production; + env = config.myEnv.websites.capitaines; in { options.myServices.websites.capitaines.production.enable = lib.mkEnableOption "enable Capitaines's website"; config = lib.mkIf cfg.enable { - myServices.websites.webappDirs."${webappName}" = siteDir; - - services.websites.env.production.vhostConfs.capitaines_mastodon = { + myServices.websites.webappDirs.capitaines_mastodon = ./mastodon_static; + services.websites.env.production.vhostConfs.capitaines_mastodon = let + root = "/run/current-system/webapps/capitaines_mastodon"; + in { certName = "capitaines"; certMainHost = "mastodon.capitaines.fr"; hosts = [ "mastodon.capitaines.fr" ]; @@ -28,6 +26,26 @@ in { ]; }; + myServices.websites.webappDirs.capitaines_discourse = ./discourse_static; + services.websites.env.production.vhostConfs.capitaines_discourse = let + root = "/run/current-system/webapps/capitaines_discourse"; + in { + certName = "capitaines"; + addToCerts = true; + hosts = [ "discourse.capitaines.fr" ]; + root = root; + extraConfig = [ + '' + ErrorDocument 404 /index.html + + DirectoryIndex index.html + Options Indexes FollowSymLinks MultiViews Includes + Require all granted + + '' + ]; + }; + services.websites.env.production.vhostConfs.capitaines = { certName = "capitaines"; addToCerts = true; -- 2.41.0