add nextcloud cron job, fix spacing and forward XFF
This commit is contained in:
parent
ca1c3d8347
commit
486b48acb8
7 changed files with 172 additions and 137 deletions
|
@ -85,7 +85,8 @@ ${nextcloud_domain}:443 {
|
|||
dial_timeout 60s
|
||||
read_timeout 3600s
|
||||
write_timeout 300s
|
||||
}
|
||||
header_up X-Forwarded-For {header.X-Forwarded-For} # Keep header from previous "general" reverse proxy
|
||||
header_up X-Real-IP {remote_host}
|
||||
}
|
||||
|
||||
header Strict-Transport-Security "max-age=15768000;"
|
||||
|
|
7
modules/nextcloud/files/nextcloud-cronjob.service.tftpl
Normal file
7
modules/nextcloud/files/nextcloud-cronjob.service.tftpl
Normal file
|
@ -0,0 +1,7 @@
|
|||
[Unit]
|
||||
Description=Nextcloud cron.php job
|
||||
|
||||
[Service]
|
||||
ExecCondition=/usr/bin/podman exec -ti -u www-data ${nextcloud_container_name} /usr/local/bin/php -f /var/www/html/occ status -ev
|
||||
ExecStart=/usr/bin/podman exec -ti -u www-data ${nextcloud_container_name} /usr/local/bin/php -f /var/www/html/cron.php
|
||||
KillMode=process
|
9
modules/nextcloud/files/nextcloud-cronjob.timer
Normal file
9
modules/nextcloud/files/nextcloud-cronjob.timer
Normal file
|
@ -0,0 +1,9 @@
|
|||
[Unit]
|
||||
Description=Run Nextcloud cron.php every 5 minutes
|
||||
|
||||
[Timer]
|
||||
OnBootSec=5min
|
||||
OnUnitActiveSec=5min
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
|
@ -192,8 +192,8 @@ locals {
|
|||
|
||||
hostname_file = {
|
||||
path = "/etc/hostname"
|
||||
user = {id = 0}
|
||||
group = {id = 0}
|
||||
user = { id = 0 }
|
||||
group = { id = 0 }
|
||||
mode = 420 # 0644
|
||||
contents = {
|
||||
source = "data:text/plain,nextcloud"
|
||||
|
@ -202,8 +202,8 @@ locals {
|
|||
|
||||
hosts_file = {
|
||||
path = "/etc/hosts"
|
||||
user = {id = 0}
|
||||
group = {id = 0}
|
||||
user = { id = 0 }
|
||||
group = { id = 0 }
|
||||
mode = 420 # 0644
|
||||
append = [
|
||||
{
|
||||
|
@ -518,8 +518,8 @@ locals {
|
|||
|
||||
php_fpm_config_file = {
|
||||
path = "/opt/php/www.conf"
|
||||
user = {id = 0}
|
||||
group = {id = 0}
|
||||
user = { id = 0 }
|
||||
group = { id = 0 }
|
||||
mode = 420 # 0644
|
||||
contents = {
|
||||
source = format(
|
||||
|
@ -542,6 +542,22 @@ locals {
|
|||
)
|
||||
}
|
||||
|
||||
nextcloud_cronjob_service_unit = {
|
||||
name = "nextcloud-cronjob.service"
|
||||
contents = templatefile(
|
||||
"${path.module}/files/nextcloud-cronjob.service.tftpl",
|
||||
{
|
||||
nextcloud_container_name = local.nextcloud_container_name
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
nextcloud_cronjob_timer_unit = {
|
||||
name = "nextcloud-cronjob.timer"
|
||||
enabled = true
|
||||
contents = file("${path.module}/files/nextcloud-cronjob.timer")
|
||||
}
|
||||
|
||||
ignition_config = {
|
||||
ignition = {
|
||||
version = "3.5.0"
|
||||
|
@ -589,6 +605,8 @@ locals {
|
|||
systemd = {
|
||||
units = [
|
||||
local.generate_secrets_systemd_unit,
|
||||
local.nextcloud_cronjob_service_unit,
|
||||
local.nextcloud_cronjob_timer_unit,
|
||||
]
|
||||
}
|
||||
passwd = {
|
||||
|
|
Loading…
Add table
Reference in a new issue