# Finventory - Finance & Inventory Management System # Developer: Abdulaziz Alqudimi # Company: Alqudimi Technology FROM python:3.11-slim # Set working directory WORKDIR /app # Set environment variables ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ DEBIAN_FRONTEND=noninteractive # Install system dependencies RUN apt-get update && apt-get install -y \ gcc \ postgresql-client \ libpq-dev \ curl \ && rm -rf /var/lib/apt/lists/* # Copy requirements file COPY requirements.txt . # Install Python dependencies RUN pip install --no-cache-dir --upgrade pip && \ pip install --no-cache-dir -r requirements.txt # Copy application code COPY . . # Create directory for logs RUN mkdir -p /var/log/finventory # Expose port EXPOSE 5000 # Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \ CMD curl -f http://localhost:5000/ || exit 1 # Run the application CMD ["python", "run.py"]