Docker Compose one-off services are not automatically attached to dokploy-network without a domain
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- docker, docker-compose, postgresql, typescript
- Lĩnh vực
- devops, infrastructure, networking
Hướng nghiên cứu
Start from the code that builds the Dokploy Compose "Preview Compose" output and decides which services get attached to dokploy-network; the reproduction shows the attachment currently happens only when a domain is configured. Trace the Compose network settings path (the Detach dokploy-network toggle) to see why one-off services without domains are skipped. Done means the migration service appears on dokploy-network in the preview and resolves the Dokploy PostgreSQL host after redeploy. Note the reporter has not yet captured the exact DB exception, so confirm the failure mode first.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
A Docker Compose deployment has an API service and a one-off database migration service. PostgreSQL is deployed separately using Dokploy's database feature (same project/environment). The migration service needs the PostgreSQL internal hostname, but Dokploy does not attach it to dokploy-network when the service has no domain. This breaks migration startup and blocks the API because it depends on successful migration completion.
The Compose application's Networks UI shows Detach dokploy-network disabled for both services. Nevertheless, the generated Preview Compose has no explicit dokploy-network attachment for migrate.
Adding a domain to api causes Dokploy to inject:
services:
api:
networks:
- dokploy-network
- default
networks:
dokploy-network:
external: true
But migrate is still only on the Compose default network. Docker inspection of the exited migration container listed only <compose-project>_default under .NetworkSettings.Networks (no dokploy-network).
Minimal reproduction
- Deploy PostgreSQL using Dokploy's database resource.
- Deploy this separate Compose application in the same Dokploy project/environment, with an internal
DATABASE_URLsupplied through Dokploy environment variables:
services:
migrate:
build:
context: .
target: migrate
env_file:
- ${ENV_FILE:-.env}
restart: 'no'
api:
build:
context: .
target: api
env_file:
- ${ENV_FILE:-.env}
depends_on:
migrate:
condition: service_completed_successfully
- Ensure the Detach dokploy-network option is off for both services in Compose network settings; save and deploy.
- Check Preview Compose and the migration container's network configuration.
- Add a Dokploy domain to
api, check Preview Compose again. Onlyapigetsdokploy-networkexplicitly.
Expected behavior
For Compose services where Detach dokploy-network is disabled, Dokploy should attach all relevant services (including one-off migration/worker jobs without domains) to the shared network, or provide a clear UI setting to opt in. Networking should not depend solely on configuring a domain. This should work without embedding Dokploy-specific names in an otherwise portable Compose file.
Actual behavior
The migrate service only gets the Compose default network and cannot resolve/reach the Dokploy-managed PostgreSQL service through its internal host. The migration exits with status 1; the api container remains in Created state because it depends on successful migration.
Environment
- Self-hosted Dokploy, reported as latest (exact version not yet captured)
- Docker Compose application and separately managed Dokploy PostgreSQL
- Same project and environment
- Migration service has no HTTP domain; API domain is configured later
Notes
The network inspection is consistent with the missing shared network, but the exact DB connection exception and a fresh inspection after redeploy have not yet been captured. Please advise if the Networks UI is expected to apply these attachments differently to Compose one-off services.
Related but distinct request: #4637 (project/environment network isolation).
- Ngôn ngữ chính
- TypeScript
- Star
- 38.8k
- Fork
- 3.2k
- Merge trung bình
- 1 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 110
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Dokploy/dokploy
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Dokploy/dokploy#6151 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Healthy Swarm task shows an empty `(Error:)` suffix on the last row of the Containers tabCó thể đã có người làm @AyhamJo7 đã nhận 4 ngày trước. Đang mởneeds-triage🔍
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Dokploy/dokploy#6115 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Global search (Cmd/Ctrl+J) never sorts results by relevanceCó thể đã có người làm @hamidzr đã nhận 6 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Dokploy/dokploy#6107 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`utils/dns/ovh.ts`: the zone-listing 403 handler replaces the provider's error instead of chaining itCó thể đã có người làm @SyncWithRaj đã nhận 9 ngày trước. Đang mởbug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
Dokploy/dokploy#6075 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
MongoDB with Replica Sets enabled: container exits with code 0 and restarts in a loop (generated startup script never waits on mongod)Có thể đã có người làm @ghazy2001 đã nhận 10 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Dokploy/dokploy#6051 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Dokploy/dokploy
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
ardia-browser/ardia#5042 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
clipy-recorder/clipy#695 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: RUN_STARTED resets the run's tool-call tally even when a subscriber suppresses the eventĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
ag-ui-protocol/ag-ui#3504 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/profiles area/sessions comp/desktop desktop/chat desktop/sessions P2 type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
NousResearch/hermes-agent#161712 ·
Maintainer thường phản hồi trong vòng 1 ngày