mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-10-01 20:42:50 +08:00
fix: resolve Docker FFmpeg SIGSEGV crash and build failures (#24)
The ffmpeg-static npm package bundles a pre-compiled binary that passes `ffmpeg -version` but crashes with SIGSEGV during actual audio processing inside Docker containers (incompatible glibc/missing shared libraries). Changes: - Install system FFmpeg via apt-get in Docker production stage, which is always compatible with the container runtime - Reverse FFmpeg resolution priority in player.ts: prefer system FFmpeg, fall back to ffmpeg-static (for non-Docker environments like Windows) - Optimize Dockerfile multi-stage build: compile native modules (opus, better-sqlite3) in builder stage and copy to production, eliminating the need for build tools (python3, make, g++) in the production image - Fix qq-music-api dependency from file:../qq-music-api (path outside Docker build context, breaks npm ci) to npm registry ^2.2.10 https://claude.ai/code/session_01JAV8sBokoifKh4Hc8XbJws
This commit is contained in:
5 files changed
+649
-394
No files matched your search
@@ -1,8 +1,8 @@
|
||||
# TSMusicBot — Docker Compose
|
||||
# 一键部署:docker-compose up -d
|
||||
#
|
||||
# 所有依赖已内置(Node.js, FFmpeg, Opus 编码器)
|
||||
# 无需安装任何额外软件
|
||||
# 所有依赖已内置(Node.js, FFmpeg, Opus 编码器)无需安装任何额外软件
|
||||
# FFmpeg 使用系统包管理器安装,确保容器内兼容性
|
||||
|
||||
services:
|
||||
tsmusicbot:
|
||||
|
||||
Reference in new issue
Block a user