Skip to content

Commit f661440

Browse files
fatherlinuxclaude
andcommitted
Add CrunchTools containerization (forked MCP server profile)
Custom Containerfile using Hummingbird Node.js 22 base with yt-dlp standalone binary, GHA workflow for Quay.io builds, and per-repo constitution. Sentry instrumentation removed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 2cad6d5 commit f661440

3 files changed

Lines changed: 133 additions & 0 deletions

File tree

.github/workflows/container.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Container Build & Push
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags: ["v*"]
7+
pull_request:
8+
branches: [main]
9+
workflow_dispatch:
10+
11+
env:
12+
QUAY_IMAGE: quay.io/crunchtools/transcriptor
13+
14+
jobs:
15+
build-and-push:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Docker Buildx
25+
uses: docker/setup-buildx-action@v3
26+
27+
- name: Log in to Quay.io
28+
if: github.event_name != 'pull_request'
29+
uses: docker/login-action@v3
30+
with:
31+
registry: quay.io
32+
username: ${{ secrets.QUAY_USERNAME }}
33+
password: ${{ secrets.QUAY_PASSWORD }}
34+
35+
- name: Extract metadata
36+
id: meta
37+
uses: docker/metadata-action@v5
38+
with:
39+
images: ${{ env.QUAY_IMAGE }}
40+
tags: |
41+
type=ref,event=branch
42+
type=ref,event=pr
43+
type=semver,pattern={{version}}
44+
type=semver,pattern={{major}}.{{minor}}
45+
type=raw,value=latest,enable={{is_default_branch}}
46+
47+
- name: Build and push
48+
uses: docker/build-push-action@v6
49+
with:
50+
context: .
51+
file: ./Containerfile
52+
push: ${{ github.event_name != 'pull_request' }}
53+
tags: ${{ steps.meta.outputs.tags }}
54+
labels: ${{ steps.meta.outputs.labels }}
55+
cache-from: type=gha
56+
cache-to: type=gha,mode=max
57+
58+
- name: Run Trivy vulnerability scanner
59+
continue-on-error: true
60+
if: github.event_name != 'pull_request'
61+
uses: aquasecurity/trivy-action@0.34.1
62+
with:
63+
image-ref: ${{ env.QUAY_IMAGE }}:latest
64+
format: "table"
65+
exit-code: "0"
66+
severity: "CRITICAL,HIGH"
67+
version: "v0.68.2"

.specify/memory/constitution.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# transcriptor Constitution
2+
3+
> **Version:** 1.0.0
4+
> **Ratified:** 2026-03-25
5+
> **Status:** Active
6+
> **Inherits:** [crunchtools/constitution](https://github.com/crunchtools/constitution) v1.4.0
7+
> **Profile:** Forked MCP Server
8+
9+
## Upstream
10+
11+
- **Source:** https://github.com/samson-art/transcriptor-mcp
12+
- **License:** MIT
13+
- **Forked at:** v0.6.8
14+
15+
## Deployment
16+
17+
- **Port:** 8022
18+
- **Env file:** ~/.config/mcp-env/transcriptor.env
19+
- **Credentials:** WHISPER_API_BASE_URL, MCP_PORT, MCP_HOST, WHISPER_MODE
20+
21+
## Patches
22+
23+
- Custom Containerfile using Hummingbird Node.js base (upstream uses node:20-slim)
24+
- Sentry instrumentation removed (no instrument.js import)
25+
- yt-dlp installed as standalone binary (no Python/Deno in image)

Containerfile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Upstream: https://github.com/samson-art/transcriptor-mcp
2+
# License: MIT
3+
# Build: podman build -f Containerfile -t quay.io/crunchtools/transcriptor .
4+
# Run: podman run --rm --network host -e MCP_PORT=8022 quay.io/crunchtools/transcriptor
5+
6+
# --- Build stage ---
7+
FROM quay.io/hummingbird/nodejs:22-builder AS builder
8+
WORKDIR /app
9+
COPY package*.json ./
10+
RUN npm ci
11+
COPY . .
12+
RUN npm run build
13+
14+
# Download yt-dlp standalone binary (includes bundled Python — no system Python needed)
15+
RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux \
16+
-o /tmp/yt-dlp && chmod +x /tmp/yt-dlp
17+
18+
# --- Runtime stage ---
19+
FROM quay.io/hummingbird/nodejs:22
20+
21+
LABEL name="transcriptor" \
22+
summary="MCP server for YouTube/video transcript extraction" \
23+
maintainer="crunchtools.com" \
24+
url="https://github.com/crunchtools/transcriptor" \
25+
org.opencontainers.image.source="https://github.com/crunchtools/transcriptor" \
26+
org.opencontainers.image.licenses="MIT"
27+
28+
WORKDIR /app
29+
30+
# Copy yt-dlp standalone binary from builder
31+
COPY --from=builder /tmp/yt-dlp /usr/local/bin/yt-dlp
32+
33+
COPY package*.json ./
34+
RUN npm ci --omit=dev --ignore-scripts && npm cache clean --force
35+
COPY --from=builder /app/dist ./dist
36+
37+
EXPOSE 8000
38+
39+
# Skip instrument.js (Sentry telemetry) — run mcp-http.js directly
40+
ENTRYPOINT ["node"]
41+
CMD ["dist/mcp-http.js"]

0 commit comments

Comments
 (0)