Fixed home-assistant 400: bad request. Fixed Nextcloud-Quirk failing. Fixed Nextcloud-Onlyoffice mkdir: permission denied.

This commit is contained in:
Raphaël Numbus
2026-03-05 09:24:51 +01:00
parent 7933a3aa57
commit a4c0c2b051
2 changed files with 13 additions and 20 deletions
+9 -9
View File
@@ -83,8 +83,8 @@ helper.mkPodmanService {
}; };
extraConfig = { extraConfig = {
systemd.services."${name}-quirk-1" = { systemd.services."${name}-quirk" = {
description = "Podman container quirk 1 : ${name}"; description = "Podman container quirk : ${name}";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "${name}.service" ]; after = [ "${name}.service" ];
onFailure = [ "service-failure-notify@%n.service" ]; onFailure = [ "service-failure-notify@%n.service" ];
@@ -114,7 +114,7 @@ helper.mkPodmanService {
http: http:
use_x_forwarded_for: true use_x_forwarded_for: true
trusted_proxies: ${config.numbus.networking.ipAddress}/24 trusted_proxies: 10.89.0.0/16
zha: zha:
EOF EOF
@@ -123,11 +123,11 @@ EOF
}; };
}; };
systemd.services."${name}-quirk-2" = { systemd.services."mqtt-quirk" = {
description = "Podman container quirk 2 : ${name}"; description = "Podman container quirk : Home-assistant MQTT";
wantedBy = [ "multi-user.target" "${name}.service" ]; wantedBy = [ "multi-user.target" "mqtt.service" ];
after = [ "${name}-secrets.service" ]; after = [ "mqtt-secrets.service" ];
before = [ "${name}.service" "${name}-permissions.service" ]; before = [ "mqtt.service" "mqtt-permissions.service" ];
onFailure = [ "service-failure-notify@%n.service" ]; onFailure = [ "service-failure-notify@%n.service" ];
startLimitBurst = 5; startLimitBurst = 5;
startLimitIntervalSec = 600; startLimitIntervalSec = 600;
@@ -157,7 +157,7 @@ listener 1883
allow_anonymous false allow_anonymous false
password_file /mosquitto/password.txt password_file /mosquitto/password.txt
EOF EOF
source /var/lib/numbus-server/${name}/.env source /var/lib/numbus-server/mqtt/.env
mosquitto_passwd -b ${cfg.configDir}/mqtt/password.txt "$HOME_ASSISTANT_MQTT_USER" "$HOME_ASSISTANT_MQTT_PASSWORD" mosquitto_passwd -b ${cfg.configDir}/mqtt/password.txt "$HOME_ASSISTANT_MQTT_USER" "$HOME_ASSISTANT_MQTT_PASSWORD"
chmod 600 ${cfg.configDir}/mqtt/password.txt chmod 600 ${cfg.configDir}/mqtt/password.txt
''; '';
+4 -11
View File
@@ -38,6 +38,7 @@ helper.mkPodmanService {
"100999:100 ${cfg.configDir}/onlyoffice" "100999:100 ${cfg.configDir}/onlyoffice"
"100999:100 ${cfg.configDir}/onlyoffice/log" "100999:100 ${cfg.configDir}/onlyoffice/log"
"100999:100 ${cfg.configDir}/onlyoffice/cache" "100999:100 ${cfg.configDir}/onlyoffice/cache"
"100999:100 ${cfg.configDir}/onlyoffice/data"
"100999:100 ${cfg.configDir}/onlyoffice/database" "100999:100 ${cfg.configDir}/onlyoffice/database"
"100032:100 ${cfg.dataDir}" "100032:100 ${cfg.dataDir}"
]; ];
@@ -135,6 +136,7 @@ helper.mkPodmanService {
volumes: volumes:
- ${cfg.configDir}/onlyoffice/log:/var/log/onlyoffice - ${cfg.configDir}/onlyoffice/log:/var/log/onlyoffice
- ${cfg.configDir}/onlyoffice/cache:/var/lib/onlyoffice - ${cfg.configDir}/onlyoffice/cache:/var/lib/onlyoffice
- ${cfg.configDir}/onlyoffice/data:/var/www/onlyoffice/
- ${cfg.configDir}/onlyoffice/database:/var/lib/postgresql - ${cfg.configDir}/onlyoffice/database:/var/lib/postgresql
security_opt: security_opt:
- no-new-privileges:true - no-new-privileges:true
@@ -203,15 +205,6 @@ helper.mkPodmanService {
- url: "http://host.containers.internal:3002" - url: "http://host.containers.internal:3002"
''; '';
environment.etc."traefik/rules/nextcloud-dav.yaml".text = ''
http:
middlewares:
nextcloud-dav:
replacePathRegex:
regex: "^/.well-known/ca(l|rd)dav"
replacement: "/remote.php/dav/"
'';
systemd.services."${name}-quirk" = { systemd.services."${name}-quirk" = {
description = "Podman container quirk : ${name}"; description = "Podman container quirk : ${name}";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
@@ -234,9 +227,9 @@ helper.mkPodmanService {
done done
source /var/lib/numbus-server/${name}/.env source /var/lib/numbus-server/${name}/.env
until $OCC status >/dev/null 2>&1; do until $OCC status | grep -iq "installed: true" >/dev/null 2>&1; do
echo "Waiting for Nextcloud to be up and running..." echo "Waiting for Nextcloud to be up and running..."
sleep 10 sleep 60
done done
$OCC db:add-missing-indices $OCC db:add-missing-indices