Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Bug] Hardcoded postgres access credentials in apps/api/src/harness.ts #2384

Open
Labels
bugSomething isn't working
@aryzhk0v

Description

@aryzhk0v

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:

  1. Clone the project
  2. Change the POSTGRES_PASSWORD environment variable value to something different from 'postgres'
  3. docker compose up -d
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp