From 9e65b21e242b9ed72cb904413cc398640823cb05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kha=C3=AFs=20COLIN?= Date: Sun, 25 Aug 2024 12:32:47 +0200 Subject: [PATCH] feat(teedy): configure container for teedy --- configuration.nix | 1 + teedy.nix | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 teedy.nix diff --git a/configuration.nix b/configuration.nix index 3518fce..9e50eaa 100644 --- a/configuration.nix +++ b/configuration.nix @@ -14,6 +14,7 @@ in (import ./sourcehut.nix { inherit base-domain; }) (import ./docspell.nix { inherit base-domain docspell; }) + (import ./teedy.nix { inherit base-domain; }) ./userprogs.nix ]; diff --git a/teedy.nix b/teedy.nix new file mode 100644 index 0000000..33b234e --- /dev/null +++ b/teedy.nix @@ -0,0 +1,27 @@ +{ base-domain, ... }: +let + fqdn = "teedy.${base-domain}"; +in +{ + virtualisation.oci-containers = { + containers = { + teedy = { + image = "sismics/docs:v1.11"; + ports = [ + "7778:8080" + ]; + volumes = [ + "/var/lib/teedy/data:/data" + ]; + environment = { + DOCS_BASE_URL = fqdn; + DOCS_ADMIN_EMAIL_INIT = "khais.colin@gmail.com"; + DATABASE_URL = "jdbc:postgresql://localhost:5432/teedy"; + DATABASE_USER = "teedy"; + DATABASE_PASSWORD = "teedy"; + DOCS_DEFAULT_LANGUAGE = "fra"; + }; + }; + }; + }; +}