Ruhi_hosting / Dockerfile
Ruhivig65's picture
Upload 4 files
21d9c07 verified
# ============================================
# 🔥 RUHI-CORE ENGINE - Dockerfile
# Premium PaaS on Hugging Face Spaces
# ============================================
FROM python:3.11-slim-bookworm
# Metadata
LABEL maintainer="RUHI-CORE Engine"
LABEL description="Premium PaaS Platform - Render.com Killer"
# Environment Variables
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV RUHI_HOME=/app
ENV RUHI_DATA=/data
ENV RUHI_PORT=7860
ENV ADMIN_USERNAME=RUHIVIGQNR
ENV ADMIN_PASSWORD=RUHIVIGQNR
ENV SECRET_KEY=ruhi_core_ultra_secret_key_2025_x9z
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
# Build essentials
build-essential \
gcc \
g++ \
# Runtime tools
curl \
wget \
git \
unzip \
zip \
tar \
# Process management
htop \
procps \
lsof \
# Network tools
net-tools \
iputils-ping \
dnsutils \
nginx \
# Node.js for JS apps support
nodejs \
npm \
# Terminal support
bash \
tmux \
# File tools
tree \
nano \
vim \
# System monitoring
sysstat \
iproute2 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install Node.js 20.x (Latest LTS)
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& npm install -g pm2 yarn pnpm
# Create app directory
WORKDIR ${RUHI_HOME}
# Create data directories (will be mounted to persistent storage)
RUN mkdir -p ${RUHI_DATA}/apps \
${RUHI_DATA}/logs \
${RUHI_DATA}/config \
${RUHI_DATA}/uploads \
${RUHI_DATA}/backups \
${RUHI_DATA}/ssl \
${RUHI_DATA}/temp \
${RUHI_DATA}/db
# Copy requirements first (Docker cache optimization)
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Make scripts executable
RUN chmod +x start.sh
# Expose the main port (HF Spaces uses 7860)
EXPOSE 7860
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=3 \
CMD curl -f http://localhost:7860/health || exit 1
# Start the engine
CMD ["bash", "start.sh"]