Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions common/setup_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ popd > /dev/null
echo "[setup_base.sh] Package cache contents:"
ls -la "$PACKAGE_CACHE"/*

echo "=== [setup_base.sh] Reserving inbound service ports (50001-50032) ==="

cat > /etc/sysctl.d/91-pgbouncer-per-instance-reserved-ports.conf <<'EOF'
# Reserve inbound pgbouncer ports from ephemeral allocation, so outbound connections can't grab one
# Allocating 4x current used for future use
# This sysctl is a single scalar: writing replaces the whole list, never appends.
# Keep this file the sole owner; add future ports to the line below, not a new drop-in.
net.ipv4.ip_local_reserved_ports = 50001-50032
EOF

echo "=== [setup_base.sh] Setting up users and groups ==="

# Create users
Expand Down