On executting the command:- npx drizzle-kit push --config=drizzle.config.js
Reading config file 'C:\Desktop\Book-crud-api\drizzle.config.js'
[[email protected]] injecting env (0) from .env -- tip: ⚙️ override existing env vars with { override: true }
Using 'pg' driver for database querying
[⣷] Pulling schema from database...
error: password authentication failed for user "postgres"
at C:\Desktop\Book-crud-api\node_modules\pg-pool\index.js:45:11
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async Object.query (C:\Desktop\Book-crud-api\node_modules\drizzle-kit\bin.cjs:80601:26)
at async fromDatabase2 (C:\Desktop\Book-crud-api\node_modules\drizzle-kit\bin.cjs:19253:25) {
length: 104,
severity: 'FATAL',
code: '28P01',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'auth.c',
line: '329',
routine: 'auth_failed'
}
I am tired of fixing this error . below is the docker-compose.yml , on searching gpt, i added volumes to it,
I also read some blog on stackoverflow in which to ignore password popup , add :-
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
POSTGRES_INITDB_ARGS: "--auth-host=scram-sha-256"
volumes:
- pgdata:/var/lib/postgresql/data
volumes:
pgdata:
I did docker compose down and again did docker compose up -d ,
but again getting the same error....