lofi-remix-api / Dockerfile
imran056's picture
Update Dockerfile
c5c2f21 verified
raw
history blame contribute delete
706 Bytes
FROM node:18-slim
# Install FFmpeg (REQUIRED for audio processing!)
RUN apt-get update && \
apt-get install -y ffmpeg && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install Node.js dependencies
RUN npm install --production
# Copy application code
COPY server.js ./
# Create required directories
RUN mkdir -p uploads outputs
# Expose port
EXPOSE 7860
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
CMD node -e "require('http').get('http://localhost:7860/', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"
# Start the server
CMD ["node", "server.js"]