Dokploy / Dokploy/dokploy

Custom Traefik labels added via Docker CLI are lost after redeployment for Standalone Applications

Open
#3,333 0 comments 1 reaction 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?

When adding custom Traefik labels (e.g., for reverse proxying an /api path to a backend service or setting custom load balancing) to a Standalone Application using the docker service update command, these labels are completely wiped out whenever a new deployment is triggered via the Dokploy UI.

It seems Dokploy forces its internal state on the Docker Swarm service during deployment, overriding any manual labels added via CLI.

Problem: There is currently no direct field in the Dokploy UI for "Standalone Applications" to persist custom Traefik labels/middlewares. While Docker Compose services have a
docker-compose.yml
to store these, Standalone Apps (Nixpacks/Dockerfile) rely on Dokploy's automated generation, which is too restrictive for advanced proxying needs.

Example Use Case: We need to route app.domain.com to the frontend container (Port 3000) and app.domain.com/api to a backend container (Port 8001) using PathPrefix rules. Currently, this can only be achieved via CLI, but it breaks on every Git push/redeploy.

Describe the solution you'd like

Suggested Solution:

Persistence: Dokploy should detect and keep existing custom labels during service updates, or
Advanced UI: Provide a "Custom Labels" text area in the Advanced Settings for Standalone Applications where users can define persistent labels that Dokploy will include in every deployment.
Current Workaround: Using a "Schedule" job in Dokploy to run the docker service update command every minute to re-apply the lost labels.

Describe alternatives you've considered
Additional context

No response

Will you send a PR to implement it?

No

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

Start by tracing the Standalone Applications deployment path and the Docker service update operation used by Dokploy. Compare the labels applied before and after a UI redeployment, then determine whether persistence or an Advanced Settings custom-labels field fits the existing flow. Done means custom Traefik labels survive subsequent deployments and are covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, typescript
Domain
devops, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.