init
This commit is contained in:
@@ -3,7 +3,15 @@ class shiori::compose (
|
|||||||
String $shiori_data,
|
String $shiori_data,
|
||||||
String $timezone,
|
String $timezone,
|
||||||
String $http_secret_key,
|
String $http_secret_key,
|
||||||
|
String $shi_version,
|
||||||
) {
|
) {
|
||||||
|
file { $shiori_data:
|
||||||
|
ensure => directory,
|
||||||
|
owner => $docker_user,
|
||||||
|
group => $docker_user,
|
||||||
|
mode => '0750',
|
||||||
|
}
|
||||||
|
|
||||||
file { "/home/${docker_user}/.docker/shiori/docker-compose.yaml":
|
file { "/home/${docker_user}/.docker/shiori/docker-compose.yaml":
|
||||||
ensure => file,
|
ensure => file,
|
||||||
owner => $docker_user,
|
owner => $docker_user,
|
||||||
@@ -13,6 +21,7 @@ class shiori::compose (
|
|||||||
'shiori_data' => $shiori_data,
|
'shiori_data' => $shiori_data,
|
||||||
'timezone' => $timezone,
|
'timezone' => $timezone,
|
||||||
'http_secret_key' => $http_secret_key,
|
'http_secret_key' => $http_secret_key,
|
||||||
|
'shi_version' => $shi_version,
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
class shiori::docker_pre (
|
class shiori::docker_pre (
|
||||||
String $docker_user,
|
String $docker_user,
|
||||||
Array[String] $packages = [],
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
#Docker-Gruppe anlegen (docker.io postinst legt sie auch an — hier garantiert idempotent)
|
#Docker-Gruppe anlegen (docker.io postinst legt sie auch an — hier garantiert idempotent)
|
||||||
@@ -22,6 +21,7 @@ class shiori::docker_pre (
|
|||||||
mode => '0755',
|
mode => '0755',
|
||||||
purge => true, # WICHTIG: Löscht alle Dateien, die NICHT von Puppet angelegt wurden!
|
purge => true, # WICHTIG: Löscht alle Dateien, die NICHT von Puppet angelegt wurden!
|
||||||
force => true, # Erlaubt das Löschen von fremden Unterordnern, falls jemand welche angelegt hat
|
force => true, # Erlaubt das Löschen von fremden Unterordnern, falls jemand welche angelegt hat
|
||||||
|
recurse => true,
|
||||||
}
|
}
|
||||||
~> exec { 'shiori-ordner-geaendert':
|
~> exec { 'shiori-ordner-geaendert':
|
||||||
command => '/usr/bin/echo "GEAENDERT: Ordner /home/${docker_user}/.docker/shiori wurde erstellt/geaendert"',
|
command => '/usr/bin/echo "GEAENDERT: Ordner /home/${docker_user}/.docker/shiori wurde erstellt/geaendert"',
|
||||||
|
|||||||
@@ -6,4 +6,5 @@ class shiori (
|
|||||||
message => $message,
|
message => $message,
|
||||||
}
|
}
|
||||||
include shiori::docker_pre
|
include shiori::docker_pre
|
||||||
|
include shiori::compose
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
<%- | String $shiori_data,
|
<%- | String $shiori_data,
|
||||||
String $timezone,
|
String $timezone,
|
||||||
String $http_secret_key,
|
String $http_secret_key,
|
||||||
|
String $shi_version,
|
||||||
-%>
|
-%>
|
||||||
|
|
||||||
services:
|
services:
|
||||||
shiori:
|
shiori:
|
||||||
image: ghcr.io/go-shiori/shiori:latest
|
image: ghcr.io/go-shiori/shiori:<%= $shi_version %>
|
||||||
container_name: shiori
|
container_name: shiori
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
Reference in New Issue
Block a user