# Base image: Node.js on Debian FROM node:22-bookworm # Install system dependencies: chromium, ffmpeg, sox RUN apt-get update && apt-get install -y \ chromium-headless-shell \ ffmpeg \ sox \ libsox-fmt-all \ ca-certificates \ git \ && rm -rf /var/lib/apt/lists/* # Set working directory WORKDIR /workspace # Copy package files COPY package*.json ./ # Install Node dependencies RUN npm ci --include=optional # Copy application code COPY . . # Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ CMD node -e "require('http').get('http://localhost:3000/health', (r) => {if (r.statusCode !== 200) throw new Error(r.statusCode)})" # Default command CMD ["node", "src/index.js"]