summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-01-12 01:56:51 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2022-01-12 01:58:58 +0100
commit8bba31e2a669e6df738cea37dfb95b0baa577fed (patch)
tree11fbfc82d0cc21098054564695a2b783c36bfe46
parentRaise X11 max clients. (diff)
downloadprofiles-8bba31e2a669e6df738cea37dfb95b0baa577fed.tar.gz
profiles-8bba31e2a669e6df738cea37dfb95b0baa577fed.tar.xz
Fix up shiori.
Diffstat (limited to '')
-rw-r--r--manifests/shiori.pp46
1 files changed, 46 insertions, 0 deletions
diff --git a/manifests/shiori.pp b/manifests/shiori.pp
new file mode 100644
index 0000000..df9b718
--- /dev/null
+++ b/manifests/shiori.pp
@@ -0,0 +1,46 @@
+class profiles::shiori (
+ String $server_name,
+ Array[String] $group_members = [],
+ $port = 8080,
+) {
+
+ class { 'shiori':
+ port => $port,
+ }
+
+ group { 'shiori':
+ ensure => present,
+ members => $group_members,
+ }
+
+ include ::profiles::group_profile
+
+ file { '/etc/profile.d/group.d/shiori':
+ ensure => file,
+ content => "export SHIORI_DIR=${shiori::dir}\n",
+ }
+
+ include ::nginx
+
+ $certname = lookup('certname')
+
+ nginx::resource::server { $server_name:
+ ipv6_enable => true,
+ ipv6_listen_options => '',
+ ssl => true,
+ ssl_redirect => true,
+ ssl_cert => "/etc/letsencrypt/live/${certname}/fullchain.pem",
+ ssl_key => "/etc/letsencrypt/live/${certname}/privkey.pem",
+ www_root => $shiori::dir,
+ use_default_location => false,
+ }
+
+ nginx::resource::location { 'shiori /':
+ location => '/',
+ proxy => "http://[::]:$port",
+ index_files => [],
+ ssl => true,
+ ssl_only => true,
+ server => $server_name,
+ }
+}