Server-side built-in plugins do not load in Docker production image (v1.11.10)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 58/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- docker, typescript
Direzione di ricerca
Inizia leggendo server/moleculer.config.ts e il punto di ingresso server/cli.js del server di produzione, quindi esamina server/packages/sdk/src/runner/index.ts per la configurazione del percorso dei servizi di sviluppo. Riproduci il deployment Docker e controlla l’array services di /health; il lavoro è completo quando i servizi dei plugin integrati vengono individuati e registrati in produzione senza compromettere i servizi core.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
In the official Docker image moonrailgun/tailchat:1.11.10 and any custom builds derived from it, none of the 17 built-in server-side plugins are loaded. The compiled .service.js files exist in the container at /app/tailchat/server/dist/plugins/*/services/, but Moleculer never discovers or registers them as services.
Steps to Reproduce
Deploy Tailchat v1.11.10 using the official Docker image
Run curl http://localhost:11000/health
Examine the services array in the JSON response
Expected Behavior
The services array should include plugin services such as:
plugin:com.msgbyte.welcome
plugin:com.msgbyte.autojoinGroup
plugin:com.msgbyte.linkmeta
...and 14 others
Actual Behavior
Only 22 core services are registered. The plugin.registry service starts but remains empty. Example output:
json
"services": ["$node","debug","openapi.bot","openapi.integration","openapi.oidc","gateway","chat.ack","chat.converse","chat.inbox","chat.message","config","group","group.extra","group.invite","plugin.registry","user.dmlist","friend","friend.request","mail","user","openapi.app","file"]
Root Cause Analysis
Production uses a different entry point than development. The startDevRunner function (which sets runner.servicePaths) is called in development mode but not in production. The production cli.js simply creates a bare moleculer.Runner() and starts it:
javascript
const moleculer_1 = require("moleculer");
const runner = new moleculer_1.Runner();
runner.start(process.argv);
The moleculer.config.ts file does not specify a services array. Moleculer's ServiceBroker requires explicit service paths to auto-discover services. Without this configuration, it only loads services that are manually imported or registered.
The glob pattern is incorrect. Even if service paths were set, the pattern plugins/**/.service.js does not match the actual directory structure plugins//services/*.service.js.
Impact
The following 17 built-in plugins are completely non-functional:
com.msgbyte.agora
com.msgbyte.autojoinGroup
com.msgbyte.bbcode
com.msgbyte.discover
com.msgbyte.getui
com.msgbyte.github
com.msgbyte.iam
com.msgbyte.linkmeta
com.msgbyte.livekit
com.msgbyte.meeting
com.msgbyte.notify
com.msgbyte.offline-icons
com.msgbyte.prettyinvite
com.msgbyte.simplenotify
com.msgbyte.tasks
com.msgbyte.topic
com.msgbyte.welcome
com.msgbyte.wxpusher
Administrators may not realize these features exist at all.
Workaround Attempted (Failed)
Modified server/packages/sdk/src/runner/index.ts to change servicePaths from .service.ts to .service.js and fixed the glob pattern to plugins//services/.service.js
Rebuilt Docker image multiple times with --no-cache
Verified compiled files exist at correct paths and can be require()d without errors
Result: No change. Plugins still do not load because startDevRunner is not the production entry point.
Proposed Fix
Add a services array to server/moleculer.config.ts:
typescript
services: [
'services/**/.service.js',
'plugins//services/*.service.js',
],
Alternatively, modify the production CLI entry point to set service paths before starting the Runner.
Environment
Tailchat version: 1.11.10
Deployment: Docker (official image and custom builds)
Host: Linux VPS (2GB RAM, Docker 24.x)
Additional Context
This issue was discovered after a multi-day debugging effort to get the auto-join plugin working. The client-side builtin.ts changes work correctly, but the server-side services never register. The compiled .service.js files are present and valid, confirming this is a service discovery issue, not a compilation failure.
- Lingua principale
- TypeScript
- Stelle
- 3.6k
- Fork
- 398
- Merge medio
- 1h 14m
- PR unite (30g)
- 2
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di msgbyte/tailchat
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
在某些地方用户名中的特殊符号并不能很好的显示 || Special symbols in user names are not displayed well in some places Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 50/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 48/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Tutte le issue di msgbyte/tailchat
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
mksglu/context-mode#1200 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
anthropics/claude-code#96687 ·
-
good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
AOSSIE-Org/DebateAI#582 · 2 commenti ·