- Notifications
You must be signed in to change notification settings - Fork5.4k
Description
Describe the Bug
When using default docker-compose.yaml to self host after changing POSTGRES_PASSWORD environment variable for nuq-postgres container from 'postgres' to something else api container exits with following error in logs:
nuq-worker-1 /app/node_modules/.pnpm/pg-pool@3.10.1_pg@8.16.3_pg-native@3.5.2_/node_modules/pg-pool/index.js:45nuq-worker-1 Error.captureStackTrace(err)nuq-worker-1 ^nuq-worker-1 error: password authentication failed for user "postgres"nuq-worker-1 at /app/node_modules/.pnpm/pg-pool@3.10.1_pg@8.16.3_pg-native@3.5.2_/node_modules/pg-pool/index.js:45:11nuq-worker-1 at process.processTicksAndRejections (node:internal/process/task_queues:105:5)nuq-worker-1 at async NuQ.getJobToProcess (/app/dist/src/services/worker/nuq.js:829:35)nuq-worker-1 at async /app/dist/src/services/worker/nuq-worker.js:41:21 {After looking at the sources looks like the postgres/postgres login/password pair is hardcoded in apps/api/src/harness.ts:
`${runtime} run -d --name ${containerName} -p 5432:5432 -e POSTGRES_PASSWORD=postgres -e POSTGRES_USER=postgres -e POSTGRES_DB=postgres firecrawl-nuq-postgres:latest`, const dbUrl = "postgresql://postgres:postgres@localhost:5432/postgres";To Reproduce
Steps to reproduce the issue:
- Clone the project
- Change the POSTGRES_PASSWORD environment variable value to something different from 'postgres'
- docker compose up -d
- The api container fails after a few seconds with error: password authentication failed for user "postgres" error
Expected Behavior
A user should be able to change db access credentials without manually editing source code. It probably can be done either by moving POSTGRES_USER/POSTGRES_PASSWORD variables to x-common-env and sourcing them in apps/api/src/harness.ts or introduce new variables (in similar way as with NUQ_DATABASE_URL)
Environment (please complete the following information):
- OS: [Linux]
- Deployment Type: [Self-hosted]
- Firecrawl Version: [the most recent version affected]
Logs
If applicable, include detailed logs to help understand the problem.