Server-side built-in plugins do not load in Docker production image (v1.11.10)
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 58/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- docker, typescript
調査の方向性
まず server/moleculer.config.ts と本番サーバーのエントリポイントである server/cli.js を読み、次に開発用のサービスパス設定について server/packages/sdk/src/runner/index.ts を調べます。Docker デプロイを再現し、/health の services 配列を確認します。組み込みプラグインのサービスが本番環境で検出・登録され、コアサービスを壊さないことをもって完了とします。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 3.6k
- フォーク
- 396
- 平均マージ
- 2分
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
msgbyte/tailchat のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 1/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 50/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 48/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
msgbyte/tailchat の issue をすべて見る
似ている issue
-
dx hacktoberfest help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
cloudflare/agents#2498 ·
メンテナーはふだん 1 日以内に返信
-
Missing repro Platform: Android
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
software-mansion/react-native-reanimated#10816 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
e2e-failure ready-to-code
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
redhat-developer/rhdh-plugin-export-overlays#4129 ·
メンテナーはふだん 1 日以内に返信