Fix supabase IPV6 only host

This commit is contained in:
MartinBraquet
2025-09-01 16:49:53 +02:00
parent 2949871ba1
commit 23c8f175bb
2 changed files with 5 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ module.exports = {
{
name: "api",
script: "node",
args: "-r tsconfig-paths/register backend/api/lib/serve.js",
args: "-r tsconfig-paths/register --dns-result-order=ipv4first backend/api/lib/serve.js",
env: {
NODE_ENV: "production",
NODE_PATH: "/usr/src/app/node_modules", // <- ensures Node finds tsconfig-paths

View File

@@ -53,11 +53,13 @@ const newClient = (
const { instanceId, password, ...settings } = props
const config = {
host: 'db.ltzepxnhhnrnvovqblfr.supabase.co',
// This host is IPV4 compatible, for the google cloud VM
host: 'aws-1-us-west-1.pooler.supabase.com',
port: 5432,
user: `postgres`,
user: `postgres.ltzepxnhhnrnvovqblfr`,
password: password,
database: 'postgres',
pool_mode: 'session',
ssl: { rejectUnauthorized: false },
family: 4, // <- forces IPv4
...settings,