PostgreSQL backup tool with Point-In-Time-Recovery and restore verification
TypeScript backupbackupsdatabasedatabase-backupdevopsdockergolangkubernetesmariadbmongodbmysqlpgpostgrespostgresqls3self-hostedsystem-administrationtoolsweb-ui
FIX (docker): Use -k /tmp for PostgreSQL socket directory to fix lock file permission denied on NAS systems
Rostislav Dugin27d891fb3440
diff --git a/Dockerfile b/Dockerfileindex 53fb42e3..1ed0ca5c 100644--- a/Dockerfile+++ b/Dockerfile@@ -312,8 +312,6 @@ if [ "\$CURRENT_UID" != "\$PUID" ]; thenusermod -o -u "\$PUID" postgresfi-chown -R postgres:postgres /var/run/postgresql-# PostgreSQL 17 binary pathsPG_BIN="/usr/lib/postgresql/17/bin"@@ -426,7 +424,12 @@ fi# Function to start PostgreSQL and wait for it to be readystart_postgres() {echo "Starting PostgreSQL..."- gosu postgres \$PG_BIN/postgres -D /databasus-data/pgdata -p 5437 &+ # -k /tmp: create Unix socket and lock file in /tmp instead of /var/run/postgresql/.+ # On NAS systems (e.g. TrueNAS Scale), the ZFS-backed Docker overlay filesystem+ # ignores chown/chmod on directories from image layers, so PostgreSQL gets+ # "Permission denied" when creating .s.PGSQL.5437.lock in /var/run/postgresql/.+ # All internal connections use TCP (-h localhost), so the socket location does not matter.+ gosu postgres \$PG_BIN/postgres -D /databasus-data/pgdata -p 5437 -k /tmp &POSTGRES_PID=\$!echo "Waiting for PostgreSQL to be ready..."