35 lines
733 B
Docker
35 lines
733 B
Docker
# MetaMesh Plugin: ffmpeg
|
|
# Extracts video/audio/subtitle metadata using FFprobe
|
|
|
|
FROM node:20-slim AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json tsconfig.json ./
|
|
RUN npm install
|
|
|
|
COPY src/ ./src/
|
|
RUN npm run build
|
|
|
|
# Production image with ffmpeg
|
|
FROM node:20-slim
|
|
|
|
# Install ffmpeg
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ffmpeg \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json ./
|
|
RUN npm install --omit=dev
|
|
|
|
COPY --from=builder /app/dist ./dist
|
|
|
|
EXPOSE 8080
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
|
|
CMD node -e "require('http').get('http://localhost:8080/health', (r) => process.exit(r.statusCode === 200 ? 0 : 1))"
|
|
|
|
CMD ["node", "dist/index.js"]
|