Files
myoffice_public/Docker/pgadmin/entrypoint.sh
T

12 lines
336 B
Bash

#!/bin/sh
# Create pgpass inside the container (mode 0600). Bind-mounted files from Windows
# cannot satisfy pgAdmin's permission check.
set -eu
PASSFILE=/var/lib/pgadmin/pgpass
printf '%s\n' 'postgres:5432:*:myoffice:myoffice' > "$PASSFILE"
chown 5050:0 "$PASSFILE" 2>/dev/null || true
chmod 600 "$PASSFILE"
exec /entrypoint.sh "$@"