`scripts/download-deps.ts` treats the aria2 entry as `source: "local"`
and copies from `extra/aria2/<os>/<arch>/aria2c` into `.deps/`. Every
other downloader (ffmpeg / N_m3u8DL-RE / BBDown / yt-dlp / mediago) is
`source: "github"` and fetched over the network, so they reach the
image fine — but the Docker build context never included `extra/`,
which made `copyLocalTool()` hit its "source missing" branch and
silently skip aria2. Resulting image had no `aria2c`, any direct
download inside the container failed with a binary-not-found error
the moment a task was dispatched.
Add a `COPY extra/ extra/` in the node-builder stage, right before
`pnpm deps:download` runs, so the vendored binary is actually visible
to the script.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The image was failing at startup with:
flag provided but not defined: -m3u8-bin
mediago-core consolidated the per-downloader `--*-bin` flags into a
single `--deps-dir` in 3.5.0-beta.1, but the Dockerfile was still
passing the old five flags (`--m3u8-bin`, `--bilibili-bin`,
`--direct-bin`, `--mediago-bin`, `--ffmpeg-bin`). Go flag parsing
rejects unknown flags, so the container exited immediately.
While fixing, extracted the invocation into
`scripts/docker-entrypoint.sh` rather than leaving a nine-line
quoted-array `CMD` at the bottom of the Dockerfile:
- `exec mediago-core …` replaces the shell so SIGTERM from
`docker stop` reaches the Go process directly — no shell parent to
swallow signals.
- `"$@"` forwards any extra flags from `docker run image … --foo=bar`
so callers can override individual options without replacing the
whole command.
- Switching from `CMD` to `ENTRYPOINT` makes the script the fixed
launch path; runtime overrides still work via the forwarded `"$@"`.
- Editing default args no longer touches the Dockerfile (and thus
doesn't invalidate the full image layer).
New `.gitattributes` pins `*.sh` to LF line endings so a Windows
checkout doesn't turn the entrypoint into a `/bin/sh^M: bad interpreter`
error inside the Linux container.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Gopeed's last release is aging and its SChannel-linked Windows build
chokes on modern CDN TLS handshakes (we hit SEC_I_MESSAGE_FRAGMENT on
twimg.com). Replace it with aria2 — same short flags (-x/-s/-k carry
over verbatim), stricter arg handling, and well-trodden cross-platform
builds.
Binaries are vendored in-tree at extra/aria2/<os>/<arch>/ rather than
pulled from a single GitHub release, because aria2 static builds for
Linux / macOS / Windows come from different upstream repos. To keep
the deps pipeline unified:
- `scripts/download-deps.ts` grows a "source": "local" branch that
copies from `extra/<tool>/<os>/<arch>/` into `.deps/<os>-<arch>/`
instead of fetching from GitHub. Resulting layout matches the rest
of the tools, so binaryResolver.ts needs no changes.
- `scripts/deps-versions.json`: `gopeed` entry removed, `aria2`
entry added with source:"local" + path:"extra/aria2".
- `apps/core/internal/core/types.go`: BinaryNames[TypeDirect]
`"gopeed"` → `"aria2c"`.
- `apps/core/internal/core/schema/loader.go`: direct schema's Args
map to aria2's flags (-d / -o, plus --console-log-level=notice /
--summary-interval=1 / --allow-overwrite=true /
--auto-file-renaming=false for parseable output and predictable
rerun behaviour). ConsoleReg regexes updated to aria2's summary
line format (e.g. "DL:512KiB" for speed, "(83%)" for percent).
`--check-certificate=false` tacked on as a workaround for the
SChannel handshake issue on the bundled 1.19.0 Windows build —
proper fix is upgrading the vendored binary to a build that links
against OpenSSL (e.g. 1.37.0), comment calls that out.
- `apps/core/.env`, `Dockerfile`, `apps/electron/scripts/build.ts`,
`apps/core/README.md`: gopeed → aria2c / aria2 references.
No DB migration: existing `type: "direct"` rows keep working, the
underlying binary just swaps.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add mediago-core (caorushizi/mediago-core) as a fourth download type
alongside m3u8, bilibili, and direct. This enables HLS/DASH streaming
downloads using the custom Go-based downloader.
Changes span the full integration path: dependency download config,
Go Core backend (type, schema, CLI flag, binary map), binary resolution
for Electron/Server, shared TypeScript types, i18n labels, UI dropdown,
dev scripts, and Dockerfile.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Consolidate all persistent paths under one mountable root:
- Docker: /app/mediago/{data,logs,downloads} with single VOLUME
- Server dev: ~/.mediago-server/{data,logs,downloads}
- DB renamed from app.db to data/mediago.db for consistency
- Update docker run command in README and docs (zh/en/jp)
- Add disclaimer to README
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
N_m3u8DL-RE is a .NET application that requires libicu for
globalization support. Without it the process aborts immediately.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Install unzip in Node builder for zip-format deps (BBDown, gopeed)
- Copy apps/electron/app/package.json needed by UI vite config
- Add second go mod download after full source copy to fix go.sum
Verified: docker build + run succeeds locally (healthy + player UI ok)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
pnpm install --frozen-lockfile requires all workspace packages to be
present. The .dockerignore excluded apps/electron/ entirely, and the
Dockerfile was missing apps/core/ and apps/electron/ package.json.
- Keep apps/electron/package.json in build context (exclude only src/)
- Add COPY for apps/core/package.json and apps/electron/package.json
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Rewrite Dockerfile as 3-stage build (Node builder → Go builder → runtime)
- Use --platform=$BUILDPLATFORM for native Node/Go compilation (no QEMU)
- Cross-compile Go binary via GOOS/GOARCH for target architecture
- Add --platform flag to download-deps.ts for target-specific deps
- Map Docker TARGETARCH to Node arch naming (amd64 → linux-x64)
- Flatten deps directory structure in runtime image
- Rewrite build-server.yml to push to ghcr.io with docker/metadata-action
- Single job multi-arch build (linux/amd64 + linux/arm64) via QEMU
- Update .dockerignore to exclude electron, docs, build artifacts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove old Koa/Socket.IO server, replace with minimal ServiceRunner launcher
- UI now connects directly to Go Core via SDK (HTTP + SSE), no middleware
- Add GoEventBridge for SSE events and progress polling
- Add Dockerfile and docker-compose for single-container deployment
- Fix web mode adapter Proxy ownKeys for proper method enumeration
- Fix auth flow: setupAuth now sets apiKey, App.tsx passes stored apiKey
- Add error handling in download-form for getVideoFolders
- Remove conversion.controller import (file was deleted)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add Docker configuration to resolve node-pty native module conflicts
- Create docker/Dockerfile for production builds
- Create docker/Dockerfile.dev for development with hot reload
- Add docker-compose.yml for easy development setup
- Include system dependencies (python3, make, g++, libicu-dev) for native modules
- Update package.json with dev:docker and build:docker commands
- Move .dockerignore to root directory for proper build context
- Remove electron rebuild scripts as Docker handles native module compilation
- Enable mixed development: webapi in container, electron on host
Usage:
- pnpm dev:docker # Start webapi in Docker container
- pnpm -F electron dev # Start electron locally in parallel
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>