Skip to content

bug: Project env query string stripped when using ${{project.DATABASE_URL}} #4348

Description

@dmrdvn

To Reproduce

  1. Create a project with Project > Environment variable:
    DATABASE_URL=postgresql+asyncpg://user:pass@some-host:/postgres?ssl=false
    (any valid URL; the important part is the query string after ?, e.g. ssl=false.)

  2. In an application service (e.g. Docker Swarm app), set Service > Environment:
    DATABASE_URL=${{project.DATABASE_URL}}

  3. Save and redeploy the service (full deploy so a new task is created).

  4. On the server, verify the runtime environment inside the container:
    docker exec "$(docker ps -qf name=)" printenv DATABASE_URL

  5. Observe that the printed DATABASE_URL does NOT contain ?ssl=false (query string is missing), while the Project env UI still shows the full URL including ?ssl=false.

  6. Workaround: paste the exact same DATABASE_URL string (including ?ssl=false) directly into each service’s Environment and redeploy printenv DATABASE_URL then shows the query string correctly.

Current vs. Expected behavior

Current: Interpolated ${{project.DATABASE_URL}} at runtime drops the URL query string (?ssl=false). Project UI still shows the full string.

Expected: The resolved value in the container must match the project value byte-for-byte, including any ?key=value query parameters.

Provide environment information

OS: Ubuntu 24.04 LTS
Docker: Swarm (Dokploy on same host)
Dokploy version: 0.29.2
App: Custom service using DATABASE_URL to Supabase pooler

Which area(s) are affected? (Select all that apply)

Application, Docker Compose

Are you deploying the applications where Dokploy is installed or on a remote server?

Same server where Dokploy is installed

Additional context

Related prior report (similar env/URL mangling): #2132, may be a different code path (project interpolation vs railpack).

Impact: Internal Postgres poolers (e.g. Supavisor) often need ssl=false on Docker networks; stripping ?ssl=false causes pooler errors like "User requested SSL connection but no downstream cert/key found" unless DATABASE_URL is duplicated per service.

Will you send a PR to fix it?

Maybe, need help

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions