CoolFace
Apppublic

brkcnplt/fintech-api

sourceHugging Facemitupdated 5mo agoView on Hugging Face
0likes
Dockerfile34 linesDownload Raw Back to root
1FROM python:3.11-slim2 3# Set working directory4WORKDIR /app5 6# Install system dependencies7RUN apt-get update && apt-get install -y \8    gcc \9    && rm -rf /var/lib/apt/lists/*10 11# Copy requirements first for better caching12COPY requirements.txt .13RUN pip install --no-cache-dir -r requirements.txt14 15# Copy application code16COPY . .17 18# Copy JSON data files (if they exist in parent during build)19# These will be created empty if not provided20RUN touch sirketler.json portfolio.json 2>/dev/null || true21 22# Hugging Face Spaces uses port 786023ENV PORT=786024 25# Create non-root user for security26RUN useradd -m -u 1000 appuser27USER appuser28 29# Expose port30EXPOSE 786031 32# Start the application33CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]34