[Bug]: Invalid YAML indentation generated in /etc/dokploy/traefik/dynamic/dokploy.yml breaks Traefik v3 file provider (404 on all domains)

オープン 初心者向け
#6,197 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
docker, typescript, yaml
領域
backend, devops

調査の方向性

まず /etc/dokploy/traefik/dynamic/dokploy.yml を生成するコードを見つけ、servers リストの書き込み方法と、http の下に routers をネストする方法を調べます。報告された Dokploy と Traefik のバージョンを使って問題を再現し、生成された YAML が Traefik に読み込まれることと、デプロイされたドメインが HTTP 200 を返すことを確認します。

索引モデルが issue の本文から書いたものです。

説明

needs-triage🔍
To Reproduce
  1. Install Dokploy (v0.31.7) on a fresh VPS (reproduced on both Debian and Ubuntu LTS, with Traefik v3.8.0).
  2. Deploy an application (e.g., an Nginx / Hello World app) and configure a domain (such as a sslip.io domain).
  3. Inspect /etc/dokploy/traefik/dynamic/dokploy.yml and check the dokploy-traefik container logs.
  4. Attempt to access the configured domain via HTTP or curl and observe that Traefik fails to load dynamic file configs and returns 404 page not found.
Current vs. Expected behavior
Current Behavior

Dokploy generates /etc/dokploy/traefik/dynamic/dokploy.yml with an unindented list item (- url: http://dokploy:3000 at column 0 under servers:) or routers: at the root level on reload/restart. Traefik v3.8.0 rejects the dynamic file configuration (ERR Error while building configuration... collecting file configs: /etc/dokploy/traefik/dynamic/dokploy.yml: routers cannot be a standalone element (type map[string]*dynamic.Router)) and does not register dynamic routers, resulting in 404 page not found across domains.

Expected Behavior

Dokploy should generate valid YAML in /etc/dokploy/traefik/dynamic/dokploy.yml with proper indentation under servers: (- url: http://dokploy:3000 indented under loadBalancer.servers) and keep routers properly nested under http:, allowing Traefik to load dynamic routers cleanly and return HTTP 200 for deployed applications.

Provide environment information
Operating System:
  OS: Ubuntu LTS (also tested on Debian)
  Arch: x86_64
Dokploy version: v0.31.7
VPS Provider: Contabo
What applications/services are you trying to deploy?
  Nginx / Hello World demo app, Next.js / web apps, database
Which area(s) are affected? (Select all that apply)

Traefik

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

Same server where Dokploy is installed

Additional context

Reproduced on a fresh Contabo VPS after reinstalling from Debian to Ubuntu LTS with traefik:v3.8.0 and Dokploy v0.31.7 (dokploy-traefik connected to dokploy-network). Before upgrading to v0.31.7 (on v0.31.6), routing worked without this issue. Manually fixing the indentation of - url: http://dokploy:3000 in /etc/dokploy/traefik/dynamic/dokploy.yml immediately restored the dynamic routers in Traefik (router-1@file) and returned HTTP 200.

Generated /etc/dokploy/traefik/dynamic/dokploy.yml:

http:
  routers: {}
  services:
    dokploy-service-app:
      loadBalancer:
        servers:
- url: http://dokploy:3000
        passHostHeader: true

### Will you send a PR to fix it?

Yes
主要言語
TypeScript
スター
38.8k
フォーク
3.2k
平均マージ
1日 8時間
マージ済み PR(30日)
117

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Dokploy/dokploy のほかの issue

Dokploy/dokploy の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。