feat(koi): tei.su deployment

This commit is contained in:
alina 🌸 2024-08-03 09:36:05 +03:00
parent 6c4a85c94c
commit a194fc64b5
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI
5 changed files with 53 additions and 1 deletions

View file

@ -28,6 +28,7 @@
./containers/pds ./containers/pds
./containers/navidrome ./containers/navidrome
./containers/zond ./containers/zond
./containers/teisu.nix
./containers/bots/pcre-sub-bot.nix ./containers/bots/pcre-sub-bot.nix
./vms/hass.nix ./vms/hass.nix
./vms/bnuuy.nix ./vms/bnuuy.nix

View file

@ -0,0 +1,50 @@
{ abs, config, ... } @ inputs:
let
secrets = import (abs "lib/secrets.nix");
UID = 1103;
in {
imports = [
(secrets.declare [{
name = "teisu-env";
owner = "teisu";
}])
];
users.users.teisu = {
isNormalUser = true;
uid = UID;
};
virtualisation.oci-containers.containers.teisu = {
image = "ghcr.io/teidesu/tei.su:sha-e6a632c@sha256:1f6da149f278d05136155ff9faa858565dcb5ab66c429cba6839f731879fcf71";
volumes = [
"/srv/teisu:/app/.runtime"
];
environmentFiles = [
(secrets.file config "teisu-env")
];
user = builtins.toString UID;
};
systemd.tmpfiles.rules = [
"d /srv/teisu 0755 teisu teisu -"
];
services.nginx.virtualHosts."tei.su" = {
forceSSL = true;
useACMEHost = "tei.su";
locations."/" = {
proxyPass = "http://teisu.docker:4321/";
};
locations."/.well-known/" = {
proxyPass = "http://teisu.docker:4321/.well-known/";
extraConfig = ''
add_header 'Access-Control-Allow-Origin' '*';
'';
};
};
}

View file

@ -2,6 +2,7 @@
{ {
# todo - move this from an ad-hoc docker compose to a proper service # todo - move this from an ad-hoc docker compose to a proper service
# todo 2: update UMAMI_HOST in teisu-env
services.nginx.virtualHosts."zond.tei.su" = { services.nginx.virtualHosts."zond.tei.su" = {
forceSSL = true; forceSSL = true;
useACMEHost = "tei.su"; useACMEHost = "tei.su";

View file

@ -21,7 +21,7 @@
phpEnv."PATH" = lib.makeBinPath [ pkgs.php ]; phpEnv."PATH" = lib.makeBinPath [ pkgs.php ];
}; };
services.nginx.virtualHosts."tei.su" = { services.nginx.virtualHosts."legacy.tei.su" = {
forceSSL = true; forceSSL = true;
useACMEHost = "tei.su"; useACMEHost = "tei.su";

BIN
secrets/teisu-env.age Normal file

Binary file not shown.