password authentication failed for user "postgres"

<-- POST /api/checkout/create-checkout-session
Query: select "id", "privy_did", "created_at" from "users" where "users"."privy_did" = $1 limit $2 -- params: ["did:privy:cm4wfnsso004pw1dbh5n8ns4c", 1]
Error in getOrCreateUser: 40 |     res = resolve
41 |     rej = reject
42 |   }).catch((err) => {
43 |     // replace the stack trace that leads to `TCP.onStreamRead` with one that leads back to the
44 |     // application that created the query
45 |     Error.captureStackTrace(err)
               ^
error: password authentication failed for user "postgres"
 code: "28P01"

I'm trying to run a local db using spire as the username with env DATABASE_URL=postgresql://spire:based@localhost:5432/outpaint_db

import { defineConfig } from "drizzle-kit";
import * as dotenvFlow from "dotenv-flow";

dotenvFlow.config({
  node_env: process.env.NODE_ENV ?? 'development',
  default_node_env: 'development',
  path: process.cwd(),
  silent: false,
});

console.log("process.env.DATABASE_URL", process.env.DATABASE_URL);

if (!process.env.DATABASE_URL) {
  throw new Error("DATABASE_URL is undefined");
}

export default defineConfig({
  schema: "./src/db/schema.ts",
  out: "./drizzle",
  dialect: "postgresql",
  dbCredentials: {
    url: process.env.DATABASE_URL!,
  },
  verbose: true,
  strict: true,
});

any ideas where this is going wrong? I can verify by conecting fine: docker exec -it postgres-latest psql -U spire
Was this page helpful?