feat(koi): tei.su deployment
This commit is contained in:
parent
6c4a85c94c
commit
a194fc64b5
5 changed files with 53 additions and 1 deletions
|
@ -28,6 +28,7 @@
|
|||
./containers/pds
|
||||
./containers/navidrome
|
||||
./containers/zond
|
||||
./containers/teisu.nix
|
||||
./containers/bots/pcre-sub-bot.nix
|
||||
./vms/hass.nix
|
||||
./vms/bnuuy.nix
|
||||
|
|
50
hosts/koi/containers/teisu.nix
Normal file
50
hosts/koi/containers/teisu.nix
Normal 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' '*';
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
{
|
||||
# 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" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "tei.su";
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
phpEnv."PATH" = lib.makeBinPath [ pkgs.php ];
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."tei.su" = {
|
||||
services.nginx.virtualHosts."legacy.tei.su" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "tei.su";
|
||||
|
||||
|
|
BIN
secrets/teisu-env.age
Normal file
BIN
secrets/teisu-env.age
Normal file
Binary file not shown.
Loading…
Reference in a new issue