Fehler – „http cannot be a standalone element“ (dynamic/config.yml)
Beim Projekt ist folgender Fehler aufgetreten:
Error while building configuration (for the first time)
error="/dynamic/config.yml: http cannot be a standalone element (type *dynamic.HTTPConfiguration)"
providerName=file
Ursache:
- Die Datei
traefik/dynamic/config.ymlwar fehlerhaft. - Es war nur
http: {}gesetzt bzw. die Struktur war doppelt/ungültig.
Datei bearbeiten:
cd /opt/project-wiki
nano traefik/dynamic/config.yml
Korrigierter Inhalt (minimal gültige Struktur):
http:
routers: {}
services: {}
middlewares: {}
Wichtig:
- Kein zweites
http:im selben Dokument. - Leere Objekte
{}sind okay, aber Struktur muss gültig YAML sein.