Dokploy / Dokploy/dokploy

Attaching network to database service breaks it

Open
#5,174 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage🔍
Dominant language
TypeScript
Stars
37.4k
Forks
3k
Avg merge
1d 3h
Merged PRs (30d)
73

Description

To Reproduce
  1. Create a database service
  2. Deploy with default network configs (attached only to dokploy-network)
  3. Check that the service is running, and check terminal availability via the Open Terminal button
  4. Stop the service
  5. Go to Docker > Networks > Add network and create a new network with the overlay driver
  6. Go back to the service page > Advanced > Networks and select the network just created and save
  7. Go back to General > Deploy to redeploy and apply the changes
Current vs. Expected behavior

Expected:
service starts up, and is attached to the network in addition to being attached to dokploy-network. Service is up and reachable.

Actual:
service visually seems to start up fine (UI) but Open Terminal does not find a container.
The docker service ls command shows 0/1 replicas, and docker ps -a does not show the container at all.

In this state, clicking the "Reload" button, then switching tab and switching back (General > Environment > General), updates the UI, which will now correctly display the service as stopped. In this state the database service is clearly not available. Re-deploying does not fix the issue.

Additional notes:

Issue persists even when detaching the dokploy-network; leaving only the network just created for the service.

If changes are reverted (network is removed from the service) and the service is re-deployed, everything starts working as expected again.

Provide environment information
Docker version 29.6.2
Docker Compose version v5.3.1
Dokploy version v0.30.2

Dokploy self hosted on Ubuntu Server VPS
Which area(s) are affected? (Select all that apply)

Databases, Docker

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

Same server where Dokploy is installed

Additional context

I tested with MariaDB and PostgreSQL database services.

Will you send a PR to fix 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 reproducing the deployment with MariaDB or PostgreSQL and an added Docker overlay network, then inspect how the service's Advanced > Networks settings are applied during redeploy. Compare the resulting docker service ls and docker ps -a output with a deployment without the extra network. Done means the database service reaches 1/1 replicas, has a container, remains reachable, and Open Terminal works.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, mariadb, postgresql, typescript
Domain
databases, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.