Dokploy / Dokploy/dokploy

Add predefined environment variables (DOKPLOY_FQDN, DOKPLOY_URL, etc.)

Open
#3,829 3 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
37.4k
Forks
3k
Avg merge
1d 3h
Merged PRs (30d)
73

Description

What problem will this feature address?

Currently, users must manually configure environment variables like NEXTAUTH_URL, when their application needs to know its own domain. This is error-prone as users must duplicate the domain configuration in multiple places, and it's easy to forget to update these when changing domains.

Describe the solution you'd like

Add automatic predefined environment variables for example:

Variable Description
DOKPLOY_FQDN Domain host (e.g., example.com)
DOKPLOY_URL Full URL with protocol (e.g., https://example.com)
DOKPLOY_PORT Port from domain config
DOKPLOY_BRANCH Git branch being deployed
DOKPLOY_COMMIT_SHA Git commit SHA
DOKPLOY_IMAGE_TAG Docker image tag (for docker source apps)
DOKPLOY_IMAGE_DIGEST Docker image digest
DOKPLOY_APPLICATION_ID Application ID
DOKPLOY_CONTAINER_NAME Container/App name

These would be available at both build-time and runtime.

Implementation includes:

  1. Add a primary switch to domains, this sets which domain to use for the environment variables
  2. Should all domain names be made available somehow?
Describe alternatives you've considered

Manually configure these in environment variables (current approach)

Additional context

No response

Will you send a PR to implement it?

Yes

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by tracing how domain configuration and build-time and runtime environment variables are assembled; done means the listed variables are automatically available in both phases, with the primary domain selection defined and Docker image metadata handled where applicable.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, typescript
Domain
devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.