# Use Latest Node.js LTS base image with Debian FROM node:22-bullseye # Environment variables ENV TZ=Asia/Jakarta \ DEBIAN_FRONTEND=noninteractive \ PORT=7860 \ MADE=DITZDEV # Install system dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ ffmpeg \ imagemagick \ webp \ python3 \ python3-pip \ git \ ca-certificates \ fonts-liberation \ fonts-dejavu \ fonts-noto-color-emoji \ # Clean up && rm -rf /var/lib/apt/lists/* \ && apt-get clean # Set timezone RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone # Create app directory WORKDIR /app # Clone private repo using a secret RUN --mount=type=secret,id=GITHUB_REPO,required=true \ git clone $(cat /run/secrets/GITHUB_REPO) DITZDEV-YT # Set working directory to cloned repo WORKDIR /app/DITZDEV-YT # Install Node.js dependencies COPY package*.json ./ RUN npm ci --only=production \ && npm cache clean --force # Install Python dependencies (if needed) # COPY requirements.txt ./ # RUN python3 -m pip install --no-cache-dir -r requirements.txt # Copy application code COPY . . # Set permissions RUN chmod -R 777 /app # Test & install RUN pwd RUN ls RUN npm i # Expose port EXPOSE 7860 # Start the application CMD ["npm", "run", "dev"]