From 57f9da1de81312665a950b23e51fa2e0fe141435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kha=C3=AFs=20COLIN?= Date: Fri, 23 Aug 2024 09:57:21 +0000 Subject: [PATCH] docspell service seems to work just need to configure nginx as a reverse-proxy --- acme.nix | 1 + docspell-initdb.sql | 5 +++++ docspell.nix | 2 +- nginx.nix | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 docspell-initdb.sql diff --git a/acme.nix b/acme.nix index b2d6e86..307bf77 100644 --- a/acme.nix +++ b/acme.nix @@ -6,6 +6,7 @@ "sourcehut.${base-domain}" "meta.sourcehut.${base-domain}" "git.sourcehut.${base-domain}" + "docspell.${base-domain}" ]; acceptTerms = true; defaults = { diff --git a/docspell-initdb.sql b/docspell-initdb.sql new file mode 100644 index 0000000..d59d0e8 --- /dev/null +++ b/docspell-initdb.sql @@ -0,0 +1,5 @@ +create user docspell with password 'docspell' login createdb; +create schema docspell; +grant all privileges on all tables in schema docspell to docspell; +grant all privileges on all sequences in schema docspell to docspell; +create database DOCSPELL owner docspell; diff --git a/docspell.nix b/docspell.nix index c2eb913..1e72739 100644 --- a/docspell.nix +++ b/docspell.nix @@ -24,7 +24,7 @@ in base-url = "https://${fqdn}"; bind = { address = "0.0.0.0"; - port = 443; + port = 7879; }; auth = { server-secret = "b64:lv56LIyZmaXTdlhvFBVpoNHt2BTQBgHpb7lwl1gyOG9MuvWKhSi91h84P15QIXirfYPSVV/R1aoTifSO688dWQ=="; diff --git a/nginx.nix b/nginx.nix index b7d837e..18f4626 100644 --- a/nginx.nix +++ b/nginx.nix @@ -19,6 +19,9 @@ "git.sourcehut.${base-domain}" = { enableACME = true; }; + "docspell.${base-domain}" = { + enableACME = true; + }; }; }; }